Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
fix: always use --save with npm (#149)
Browse files Browse the repository at this point in the history
this forces saving to package.json even if save=false is set in npmrc
  • Loading branch information
jdx authored Aug 17, 2018
1 parent 5cc3f54 commit 151af6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generators/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,10 @@ class App extends Generator {
if (process.env.YARN_MUTEX) yarnOpts.mutex = process.env.YARN_MUTEX
const install = (deps: string[], opts: object) => this.yarn ? this.yarnInstall(deps, opts) : this.npmInstall(deps, opts)
const dev = this.yarn ? {dev: true} : {'save-dev': true}
const save = this.yarn ? {} : {save: true}
Promise.all([
install(devDependencies, {...yarnOpts, ...dev, ignoreScripts: true}),
install(dependencies, yarnOpts),
install(dependencies, {...yarnOpts, ...save}),
]).then(() => {
if (['plugin', 'multi'].includes(this.type)) {
this.spawnCommandSync(path.join('.', 'node_modules/.bin/oclif-dev'), ['readme'])
Expand Down

0 comments on commit 151af6f

Please sign in to comment.