File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -67,26 +67,26 @@ export async function generatePackageJson(answers: prompts.Answers<string>) {
6767 requiredDependencies . push ( dependencies . formatter ) ;
6868 }
6969
70- const [
71- bscVersion ,
72- linterVersion ,
73- formatterVersion
74- ] = await Promise . all ( requiredDependencies . map ( dep => getPackageVersion ( dep ) ) ) ;
75-
7670 if ( requiresBsc ) {
71+ const bscVersion = await getPackageVersion ( dependencies . bsc ) ;
72+ console . info ( `Using ${ dependencies . bsc } ^${ bscVersion } ` ) ;
7773 contents . scripts . prebuild = 'rm -rf dist' ;
7874 contents . scripts . build = 'bsc' ;
7975 contents . scripts [ 'build:prod' ] = 'npm run build -- --sourceMap=false' ;
8076 contents . devDependencies . brighterscript = `^${ bscVersion } ` ;
8177 }
8278
8379 if ( requiresLinter ) {
80+ const linterVersion = await getPackageVersion ( dependencies . linter ) ;
81+ console . info ( `Using ${ dependencies . linter } ^${ linterVersion } ` ) ;
8482 contents . scripts . lint = 'bslint --project config/bsconfig.lint.json --lintConfig config/bslint.jsonc' ;
8583 contents . scripts [ 'lint:fix' ] = 'npm run lint -- --fix' ;
8684 contents . devDependencies [ dependencies . linter ] = `^${ linterVersion } ` ;
8785 }
8886
8987 if ( requiresFormatter ) {
88+ const formatterVersion = await getPackageVersion ( dependencies . formatter ) ;
89+ console . info ( `Using ${ dependencies . formatter } ^${ formatterVersion } ` ) ;
9090 contents . scripts [ 'format:base' ] = 'bsfmt "src/**/*.brs" "src/**/*.bs" "!src/components/lib/**/*" "!src/source/lib/**/*" "!**/bslib.brs" --bsfmt-path "config/bsfmt.jsonc"' ;
9191 contents . scripts . format = 'npm run format:base -- --check' ;
9292 contents . scripts [ 'format:fix' ] = 'npm run format:base -- --write' ;
You can’t perform that action at this time.
0 commit comments