@@ -292,7 +292,7 @@ function install(root, useYarn, dependencies, verbose, isOnline) {
292
292
let args ;
293
293
if ( useYarn ) {
294
294
command = 'yarnpkg' ;
295
- args = [ 'add' , '--exact' ] ;
295
+ args = [ 'add' , '--exact' , '--dev' ] ;
296
296
if ( ! isOnline ) {
297
297
args . push ( '--offline' ) ;
298
298
}
@@ -315,7 +315,7 @@ function install(root, useYarn, dependencies, verbose, isOnline) {
315
315
command = 'npm' ;
316
316
args = [
317
317
'install' ,
318
- '--save' ,
318
+ '--save-dev ' ,
319
319
'--save-exact' ,
320
320
'--loglevel' ,
321
321
'error' ,
@@ -421,6 +421,7 @@ function run(
421
421
// On 'exit' we will delete these files from target directory.
422
422
const knownGeneratedFiles = [
423
423
'package.json' ,
424
+ 'package-lock.json' ,
424
425
'yarn.lock' ,
425
426
'node_modules' ,
426
427
] ;
@@ -670,18 +671,18 @@ function setCaretRangeForRuntimeDeps(packageName) {
670
671
const packagePath = path . join ( process . cwd ( ) , 'package.json' ) ;
671
672
const packageJson = require ( packagePath ) ;
672
673
673
- if ( typeof packageJson . dependencies === 'undefined' ) {
674
- console . error ( chalk . red ( 'Missing dependencies in package.json' ) ) ;
674
+ if ( typeof packageJson . devDependencies === 'undefined' ) {
675
+ console . error ( chalk . red ( 'Missing devDependencies in package.json' ) ) ;
675
676
process . exit ( 1 ) ;
676
677
}
677
678
678
- const packageVersion = packageJson . dependencies [ packageName ] ;
679
+ const packageVersion = packageJson . devDependencies [ packageName ] ;
679
680
if ( typeof packageVersion === 'undefined' ) {
680
681
console . error ( chalk . red ( `Unable to find ${ packageName } in package.json` ) ) ;
681
682
process . exit ( 1 ) ;
682
683
}
683
684
684
- makeCaretRange ( packageJson . dependencies , 'solid-js' ) ;
685
+ makeCaretRange ( packageJson . devDependencies , 'solid-js' ) ;
685
686
// makeCaretRange(packageJson.dependencies, 'solid-element');
686
687
687
688
fs . writeFileSync ( packagePath , JSON . stringify ( packageJson , null , 2 ) + os . EOL ) ;
0 commit comments