Skip to content

Commit

Permalink
feat: add 'nsc' alias
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker authored and rigor789 committed Sep 4, 2020
1 parent c8cd933 commit c8c2d94
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.js
!/*.js
!bin/nativescript.js
!bin/nsc.js
!vendor/*.js
!resources/**
!lib/common/test/resources/**/*
Expand Down
3 changes: 3 additions & 0 deletions bin/nsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require("./tns");
3 changes: 3 additions & 0 deletions bin/nsc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require("./tns");
4 changes: 2 additions & 2 deletions lib/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export class Options {
private optionsWhiteList = ["ui", "recursive", "reporter", "require", "timeout", "_", "$0"]; // These options shouldn't be validated
private globalOptions: IDictionary<IDashedOption> = {
log: { type: OptionType.String, hasSensitiveValue: false },
verbose: { type: OptionType.Boolean, alias: "v", hasSensitiveValue: false },
version: { type: OptionType.Boolean, hasSensitiveValue: false },
verbose: { type: OptionType.Boolean, hasSensitiveValue: false },
version: { type: OptionType.Boolean, alias: "v", hasSensitiveValue: false },
help: { type: OptionType.Boolean, alias: "h", hasSensitiveValue: false },
profileDir: { type: OptionType.String, hasSensitiveValue: true },
analyticsClient: { type: OptionType.String, hasSensitiveValue: false },
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "nativescript",
"preferGlobal": true,
"version": "6.8.0-alpha.0",
"version": "6.8.0-rc.2",
"author": "NativeScript <support@nativescript.org>",
"description": "Command-line interface for building NativeScript projects",
"bin": {
"tns": "./bin/tns",
"nativescript": "./bin/tns"
"nativescript": "./bin/tns",
"nsc": "./bin/tns"
},
"main": "./lib/nativescript-cli-lib.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe("options", () => {
options.validateOptions();
process.argv.pop();
assert.isFalse(isExecutionStopped);
assert.isTrue(options.verbose);
assert.isTrue(options.version);
});

// all numbers are changed to strings before calling validateOptions
Expand Down

0 comments on commit c8c2d94

Please sign in to comment.