Skip to content

Commit adbfe03

Browse files
committed
Fix coding style. Remove unnecessary imports.
1 parent 3a7b69f commit adbfe03

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

lib/definitions/project.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interface ITNSModulesService {
22
tnsModulesInstallationPath(projectRoot: string): IFuture<string>;
3-
NPM_TNS_CORE_MODULES_NAME: string;
3+
npmTnsCoreModulesName: string;
44
}
55

66
interface IProjectService {

lib/services/project-service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class ProjectService implements IProjectService {
8383
tnsModulesVersion = this.$options.tnsModulesVersion;
8484
}
8585
else {
86-
var coreModulesName = this.$tnsModulesService.NPM_TNS_CORE_MODULES_NAME;
86+
let coreModulesName = this.$tnsModulesService.npmTnsCoreModulesName;
8787
tnsModulesVersion = this.$fs.readJson(path.join(appPath, constants.PACKAGE_JSON_FILE_NAME)).wait()[coreModulesName]["version"];
8888
}
8989

@@ -116,11 +116,11 @@ export class ProjectService implements IProjectService {
116116
}
117117

118118
// Copy tns-core-modules package to node_modules destination directory
119-
var nodeModulesDestination = path.join(appDestinationPath, constants.NODE_MODULES_FOLDER_NAME);
119+
let nodeModulesDestination = path.join(appDestinationPath, constants.NODE_MODULES_FOLDER_NAME);
120120
this.$fs.ensureDirectoryExists(nodeModulesDestination).wait();
121121
shell.cp('-Rf', path.join(tnsModulesPath, '*'), nodeModulesDestination);
122122

123-
var tnsModulesVersion = this.$fs.readJson(path.join(nodeModulesDestination, constants.PACKAGE_JSON_FILE_NAME)).wait().version;
123+
let tnsModulesVersion = this.$fs.readJson(path.join(nodeModulesDestination, constants.PACKAGE_JSON_FILE_NAME)).wait().version;
124124

125125
this.createBasicProjectStructure(projectDir, projectId, tnsModulesVersion).wait();
126126
}).future<void>()();
@@ -132,7 +132,7 @@ export class ProjectService implements IProjectService {
132132

133133
this.$projectDataService.initialize(projectDir);
134134
this.$projectDataService.setValue("id", projectId).wait();
135-
this.$projectDataService.setValue(this.$tnsModulesService.NPM_TNS_CORE_MODULES_NAME, { version: tnsModulesVersion }).wait();
135+
this.$projectDataService.setValue(this.$tnsModulesService.npmTnsCoreModulesName, { version: tnsModulesVersion }).wait();
136136
}).future<void>()();
137137
}
138138

lib/services/tns-modules-service.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
///<reference path="../.d.ts"/>
2-
"use strict";
3-
4-
import util = require("util");
5-
import path = require("path");
6-
import shell = require("shelljs");
7-
import npm = require("npm");
8-
var helpers = require("../common/helpers");
92
import Future = require("fibers/future");
103

114
export class TNSModulesService implements ITNSModulesService {
12-
private static NPM_TNS_CORE_MODULES_NAME = "tns-core-modules";
5+
private static npmTnsCoreModulesName = "tns-core-modules";
136

147
public constructor(private $npmInstallationManager: INpmInstallationManager) { }
158

169
public tnsModulesInstallationPath(version: string): IFuture<string> {
17-
return this.$npmInstallationManager.install(TNSModulesService.NPM_TNS_CORE_MODULES_NAME, version);
10+
return this.$npmInstallationManager.install(TNSModulesService.npmTnsCoreModulesName, version);
1811
}
1912

20-
public get NPM_TNS_CORE_MODULES_NAME(): string {
21-
return TNSModulesService.NPM_TNS_CORE_MODULES_NAME;
13+
public get npmTnsCoreModulesName(): string {
14+
return TNSModulesService.npmTnsCoreModulesName;
2215
}
2316
}
2417
$injector.register("tnsModulesService", TNSModulesService);

0 commit comments

Comments
 (0)