Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions lib/services/plugins-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,11 @@ export class PluginsService implements IPluginsService {

public ensureAllDependenciesAreInstalled(): IFuture<void> {
return (() => {
if(!this.$fs.exists(path.join(this.$projectData.projectDir, constants.NODE_MODULES_FOLDER_NAME)).wait()) {
let command = "npm install ";
if(this.$options.ignoreScripts) {
command += "--ignore-scripts";
}
this.$childProcess.exec(command, { cwd: this.$projectData.projectDir }).wait();
let command = "npm install ";
if(this.$options.ignoreScripts) {
command += "--ignore-scripts";
}
this.$childProcess.exec(command, { cwd: this.$projectData.projectDir }).wait();
}).future<void>()();
}

Expand Down
5 changes: 4 additions & 1 deletion test/npm-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ describe("Npm support tests", () => {
let scopedName = "@reactivex/rxjs";
let scopedModule = path.join(projectFolder, "node_modules", "@reactivex/rxjs");
let scopedPackageJson = path.join(scopedModule, "package.json");
addDependencies(testInjector, projectFolder, {scopedName: "0.0.0-prealpha.3"}).wait();
let dependencies: any = {};
dependencies[scopedName] = "0.0.0-prealpha.3";
// Do not pass dependencies object as the sinopia cannot work with scoped dependencies. Instead move them manually.
addDependencies(testInjector, projectFolder, {}).wait();
//create module dir, and add a package.json
shelljs.mkdir("-p", scopedModule);
fs.writeFile(scopedPackageJson, JSON.stringify({name: scopedName})).wait();
Expand Down