Skip to content

Commit 29a5190

Browse files
committed
More code review changes
1 parent ebf4c97 commit 29a5190

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

lib/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export var APP_FOLDER_NAME = "app";
44
export var DEFAULT_PROJECT_ID = "com.telerik.tns.HelloWorld";
55
export var DEFAULT_PROJECT_NAME = "HelloNativescript";
66
export var APP_RESOURCES_FOLDER_NAME = "App_Resources";
7-
export var PROJECT_FRAMEWORK_DIR = "framework";
7+
export var PROJECT_FRAMEWORK_FOLDER_NAME = "framework";
88

lib/definitions/shelljs.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare module "shelljs" {
2-
function cp(arg: string, sourcePath: any, destinationPath: string): void;
2+
function cp(arg: string, sourcePath: string, destinationPath: string): void;
3+
function cp(arg: string, sourcePath: string[], destinationPath: string): void;
34
function sed(arg: string, oldValue: any, newValue: string, filePath: string): void;
45
function mv(source: string[], destination: string);
56
function grep(what: any, where: string): any;

lib/node-package-manager.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ export class NodePackageManager implements INodePackageManager {
3030
public install(packageName: string, pathToSave?: string): IFuture<string> {
3131
return (() => {
3232
var action = (packageName: string) => {
33-
this.installCore(pathToSave || npm.cache, packageName).wait();
33+
pathToSave = pathToSave || npm.cache;
34+
this.installCore(pathToSave, packageName).wait();
3435
};
3536

3637
this.tryExecuteAction(action, packageName).wait();
3738

38-
return path.join(pathToSave || npm.cache, "node_modules", packageName);
39+
return path.join(pathToSave, "node_modules", packageName);
3940

4041
}).future<string>()();
4142
}

lib/services/platform-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class PlatformService implements IPlatformService {
103103
// get path to downloaded framework package
104104
var frameworkDir = this.$npm.install(this.$platformsData.getPlatformData(platform).frameworkPackageName,
105105
path.join(this.$projectData.platformsDir, platform)).wait();
106-
frameworkDir = path.join(frameworkDir, constants.PROJECT_FRAMEWORK_DIR);
106+
frameworkDir = path.join(frameworkDir, constants.PROJECT_FRAMEWORK_FOLDER_NAME);
107107

108108
platformProjectService.createProject(platformData.projectRoot, frameworkDir).wait();
109109

0 commit comments

Comments
 (0)