From 201ac0215bfa0909ec69a0452d368dad30a9b1c8 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Thu, 9 Oct 2014 15:10:33 +0300 Subject: [PATCH] Sync with latest common lib --- lib/commands/create-project.ts | 2 ++ lib/common | 2 +- lib/declarations.ts | 2 ++ lib/nativescript-cli.ts | 6 +----- lib/options.ts | 7 ++++++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/commands/create-project.ts b/lib/commands/create-project.ts index 37efb74ddd..4333a5dace 100644 --- a/lib/commands/create-project.ts +++ b/lib/commands/create-project.ts @@ -3,6 +3,8 @@ export class CreateProjectCommand implements ICommand { constructor(private $projectService: IProjectService) { } + public enableHooks = false; + execute(args: string[]): IFuture { return (() => { this.$projectService.createProject(args[0]).wait(); diff --git a/lib/common b/lib/common index 6b70dc4c1c..d3763a8474 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 6b70dc4c1c08b60a8deac3b1f4ed9cad85d09c98 +Subproject commit d3763a84749ceef805162f1bc57a1b0e9ce50456 diff --git a/lib/declarations.ts b/lib/declarations.ts index d7f1461050..951a9712f9 100644 --- a/lib/declarations.ts +++ b/lib/declarations.ts @@ -14,6 +14,8 @@ interface INpmInstallOptions { interface IStaticConfig extends Config.IStaticConfig { } +interface IConfiguration extends Config.IConfig { } + interface IApplicationPackage { packageName: string; time: Date; diff --git a/lib/nativescript-cli.ts b/lib/nativescript-cli.ts index 3c1533963f..0ca9cfa6f7 100644 --- a/lib/nativescript-cli.ts +++ b/lib/nativescript-cli.ts @@ -3,7 +3,6 @@ import path = require("path"); -require("./common/extensions"); require("./bootstrap"); require("./options"); @@ -12,11 +11,8 @@ errors.installUncaughtExceptionListener(); $injector.register("config", { CI_LOGGER: false, - PROJECT_FILE_NAME: ".tnsproject", DEBUG: process.env.NATIVESCRIPT_DEBUG, - version: require("../package.json").version, - helpTextPath: path.join(__dirname, "../resources/help.txt"), - client: "nativescript" + TYPESCRIPT_COMPILER_OPTIONS: { } }); var dispatcher = $injector.resolve("dispatcher"); diff --git a/lib/options.ts b/lib/options.ts index be8c066643..cfe1bcb655 100644 --- a/lib/options.ts +++ b/lib/options.ts @@ -2,6 +2,7 @@ import path = require("path"); import helpers = require("./common/helpers"); +import commonOptions = require("./common/options"); import osenv = require("osenv"); var knownOpts:any = { @@ -27,8 +28,12 @@ var knownOpts:any = { "p" : "path" }; +_.extend(knownOpts, commonOptions.knownOpts); +_.extend(shorthands, commonOptions.shorthands); + var defaultProfileDir = path.join(osenv.home(), ".nativescript-cli"); -var parsed = helpers.getParsedOptions(knownOpts, shorthands, defaultProfileDir); +var parsed = helpers.getParsedOptions(knownOpts, shorthands); +parsed["profile-dir"] = parsed["profile-dir"] || defaultProfileDir; Object.keys(parsed).forEach((opt) => exports[opt] = parsed[opt]);