Skip to content

Commit 74da44f

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Use npm api to install all project dependencies
1 parent c289ad6 commit 74da44f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/services/plugins-service.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,7 @@ export class PluginsService implements IPluginsService {
162162
let packageJsonContent = this.$fs.readJson(this.getPackageJsonFilePath()).wait();
163163
let allDependencies = _.keys(packageJsonContent.dependencies).concat(_.keys(packageJsonContent.devDependencies));
164164
if(this.$options.force || _.difference(allDependencies, installedDependencies).length) {
165-
let command = "npm install ";
166-
if(this.$options.ignoreScripts) {
167-
command += "--ignore-scripts";
168-
}
169-
this.$childProcess.exec(command, { cwd: this.$projectData.projectDir }).wait();
165+
this.$npm.install(this.$projectData.projectDir, this.$projectData.projectDir, { "ignore-scripts": this.$options.ignoreScripts }).wait();
170166
}
171167
}).future<void>()();
172168
}

0 commit comments

Comments
 (0)