In the lastest yeoman, this.npmInstall() is deprecated, which function can replace this? such as I want to install vue
this.npmInstall(['vue'], { 'save-dev': false });
this.npmInstall(['webpack', "vue-loader"], { 'save-dev': false });
In the lastest yeoman, this.npmInstall() is deprecated, which function can replace this? such as I want to install vue
this.npmInstall(['vue'], { 'save-dev': false });
this.npmInstall(['webpack', "vue-loader"], { 'save-dev': false });
According to the release notes for v5.0.0, this functionality was "replaced by package.json manipulation". Use these global methods instead:
addDependencies({ dependency: 'version' });addDevDependencies({ dependency: 'version' });Unfortunately, the documentation for managing dependencies is out-of-date, though there is a help-needed issue for it.
I believe spawnCommandSync still works:
this.spawnCommandSync('npm', ['i', 'vue', 'vue-loader', 'webpack']);