File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 55 * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66 */
77
8-
98import { Messages } from '@salesforce/core' ;
109import { SfCommand } from '@salesforce/sf-plugins-core' ;
1110import { generate } from '../../../util.js' ;
1211
13- Messages . importMessagesDirectoryFromMetaUrl ( import . meta. url )
12+ Messages . importMessagesDirectoryFromMetaUrl ( import . meta. url ) ;
1413const messages = Messages . loadMessages ( '@salesforce/plugin-dev' , 'dev.generate.library' ) ;
1514
1615export default class GenerateLibrary extends SfCommand < void > {
1716 public static enableJsonFlag = false ;
17+ public static readonly hidden = true ;
1818 public static readonly summary = messages . getMessage ( 'summary' ) ;
1919 public static readonly description = messages . getMessage ( 'description' ) ;
2020 public static readonly examples = messages . getMessages ( 'examples' ) ;
Original file line number Diff line number Diff line change @@ -87,10 +87,18 @@ export default class Library extends Generator {
8787 repository : `${ this . answers . org } /${ this . answers . name } ` ,
8888 homepage : `https://github.com/${ this . answers . org } /${ this . answers . name } ` ,
8989 description : this . answers . description ,
90+ bugs : { url : `https://github.com/${ this . answers . org } /${ this . answers . name } /issues` } ,
9091 } ;
9192 const final = Object . assign ( { } , pjson , updated ) ;
9293 this . fs . writeJSON ( this . destinationPath ( './package.json' ) , final ) ;
9394
95+ // Replace the message import
96+ replace . sync ( {
97+ files : `${ this . env . cwd } /src/hello.ts` ,
98+ from : / @ s a l e s f o r c e \/ l i b r a r y - t e m p l a t e / g,
99+ to : `${ this . answers . scope } /${ this . answers . name } ` ,
100+ } ) ;
101+
94102 replace . sync ( {
95103 files : `${ this . env . cwd } /**/*` ,
96104 from : / l i b r a r y - t e m p l a t e / g,
You can’t perform that action at this time.
0 commit comments