Skip to content

Sync with latest common lib #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2014
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
2 changes: 2 additions & 0 deletions lib/commands/create-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
export class CreateProjectCommand implements ICommand {
constructor(private $projectService: IProjectService) { }

public enableHooks = false;

execute(args: string[]): IFuture<void> {
return (() => {
this.$projectService.createProject(args[0]).wait();
Expand Down
2 changes: 2 additions & 0 deletions lib/declarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ interface INpmInstallOptions {

interface IStaticConfig extends Config.IStaticConfig { }

interface IConfiguration extends Config.IConfig { }

interface IApplicationPackage {
packageName: string;
time: Date;
Expand Down
6 changes: 1 addition & 5 deletions lib/nativescript-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import path = require("path");

require("./common/extensions");
require("./bootstrap");
require("./options");

Expand All @@ -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");
Expand Down
7 changes: 6 additions & 1 deletion lib/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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]);

Expand Down