Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit 9c4d738

Browse files
committed
Move to devDependencies
1 parent f4451f2 commit 9c4d738

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

createSolid.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function install(root, useYarn, dependencies, verbose, isOnline) {
292292
let args;
293293
if (useYarn) {
294294
command = 'yarnpkg';
295-
args = ['add', '--exact'];
295+
args = ['add', '--exact', '--dev'];
296296
if (!isOnline) {
297297
args.push('--offline');
298298
}
@@ -315,7 +315,7 @@ function install(root, useYarn, dependencies, verbose, isOnline) {
315315
command = 'npm';
316316
args = [
317317
'install',
318-
'--save',
318+
'--save-dev',
319319
'--save-exact',
320320
'--loglevel',
321321
'error',
@@ -421,6 +421,7 @@ function run(
421421
// On 'exit' we will delete these files from target directory.
422422
const knownGeneratedFiles = [
423423
'package.json',
424+
'package-lock.json',
424425
'yarn.lock',
425426
'node_modules',
426427
];
@@ -670,18 +671,18 @@ function setCaretRangeForRuntimeDeps(packageName) {
670671
const packagePath = path.join(process.cwd(), 'package.json');
671672
const packageJson = require(packagePath);
672673

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'));
675676
process.exit(1);
676677
}
677678

678-
const packageVersion = packageJson.dependencies[packageName];
679+
const packageVersion = packageJson.devDependencies[packageName];
679680
if (typeof packageVersion === 'undefined') {
680681
console.error(chalk.red(`Unable to find ${packageName} in package.json`));
681682
process.exit(1);
682683
}
683684

684-
makeCaretRange(packageJson.dependencies, 'solid-js');
685+
makeCaretRange(packageJson.devDependencies, 'solid-js');
685686
// makeCaretRange(packageJson.dependencies, 'solid-element');
686687

687688
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + os.EOL);

0 commit comments

Comments
 (0)