diff --git a/src/commands/dev/generate/library.ts b/src/commands/dev/generate/library.ts index e3085e79..d5f2304d 100644 --- a/src/commands/dev/generate/library.ts +++ b/src/commands/dev/generate/library.ts @@ -5,16 +5,16 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - import { Messages } from '@salesforce/core'; import { SfCommand } from '@salesforce/sf-plugins-core'; import { generate } from '../../../util.js'; -Messages.importMessagesDirectoryFromMetaUrl(import.meta.url) +Messages.importMessagesDirectoryFromMetaUrl(import.meta.url); const messages = Messages.loadMessages('@salesforce/plugin-dev', 'dev.generate.library'); export default class GenerateLibrary extends SfCommand { public static enableJsonFlag = false; + public static readonly hidden = true; public static readonly summary = messages.getMessage('summary'); public static readonly description = messages.getMessage('description'); public static readonly examples = messages.getMessages('examples'); diff --git a/src/generators/library.ts b/src/generators/library.ts index a0a2fe65..a3a19392 100644 --- a/src/generators/library.ts +++ b/src/generators/library.ts @@ -87,10 +87,18 @@ export default class Library extends Generator { repository: `${this.answers.org}/${this.answers.name}`, homepage: `https://github.com/${this.answers.org}/${this.answers.name}`, description: this.answers.description, + bugs: { url: `https://github.com/${this.answers.org}/${this.answers.name}/issues` }, }; const final = Object.assign({}, pjson, updated); this.fs.writeJSON(this.destinationPath('./package.json'), final); + // Replace the message import + replace.sync({ + files: `${this.env.cwd}/src/hello.ts`, + from: /@salesforce\/library-template/g, + to: `${this.answers.scope}/${this.answers.name}`, + }); + replace.sync({ files: `${this.env.cwd}/**/*`, from: /library-template/g,