Skip to content

Commit c0b11cf

Browse files
committed
More code review changes
1 parent 0bc9d78 commit c0b11cf

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

lib/declarations.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
interface INodePackageManager {
22
cache: string;
33
load(config?: any): IFuture<void>;
4-
install(where: string, what: string): IFuture<any>;
5-
installSafe(packageName: string, pathToSave?: string): IFuture<string>;
4+
install(packageName: string, pathToSave?: string): IFuture<string>;
65
}
76

87
interface IPropertiesParser {

lib/node-package-manager.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class NodePackageManager implements INodePackageManager {
2727
return future;
2828
}
2929

30-
public install(where: string, what: string): IFuture<any> {
30+
private installCore(where: string, what: string): IFuture<any> {
3131
var future = new Future<any>();
3232
npm.commands["install"](where, what, (err, data) => {
3333
if(err) {
@@ -51,10 +51,10 @@ export class NodePackageManager implements INodePackageManager {
5151
}).future<void>()();
5252
}
5353

54-
public installSafe(packageName: string, pathToSave?: string): IFuture<string> {
54+
public install(packageName: string, pathToSave?: string): IFuture<string> {
5555
return (() => {
5656
var action = (packageName: string) => {
57-
this.install(pathToSave || npm.cache, packageName).wait();
57+
this.installCore(pathToSave || npm.cache, packageName).wait();
5858
};
5959

6060
this.tryExecuteAction(action, packageName).wait();

lib/services/platform-project-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PlatformProjectService implements IPlatformProjectService {
3232
this.$logger.out("Copying template files...");
3333

3434
// get path to downloaded framework package
35-
var frameworkDir = this.$npm.installSafe(this.$platformsData.getPlatformData(platform).frameworkPackageName,
35+
var frameworkDir = this.$npm.install(this.$platformsData.getPlatformData(platform).frameworkPackageName,
3636
path.join(this.$projectData.platformsDir, platform)).wait();
3737
frameworkDir = path.join(frameworkDir, PlatformProjectService.PROJECT_FRAMEWORK_DIR);
3838

lib/services/project-templates-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class ProjectTemplatesService implements IProjectTemplatesService {
1414
public constructor(private $npm: INodePackageManager) { }
1515

1616
public get defaultTemplatePath(): IFuture<string> {
17-
return this.$npm.installSafe(ProjectTemplatesService.NPM_DEFAULT_TEMPLATE_NAME);
17+
return this.$npm.install(ProjectTemplatesService.NPM_DEFAULT_TEMPLATE_NAME);
1818
}
1919
}
2020
$injector.register("projectTemplatesService", ProjectTemplatesService);

0 commit comments

Comments
 (0)