22"use strict" ;
33
44import path = require( "path" ) ;
5- import helpers = require( "./common/helpers" ) ;
65import commonOptions = require( "./common/options" ) ;
76import osenv = require( "osenv" ) ;
87import hostInfo = require( "./common/host-info" ) ;
@@ -23,8 +22,8 @@ var knownOpts:any = {
2322 shorthands : IStringDictionary = {
2423 } ;
2524
26- _ . extend ( knownOpts , commonOptions . knownOpts ) ;
27- _ . extend ( shorthands , commonOptions . shorthands ) ;
25+ _ . extend ( commonOptions . knownOpts , knownOpts ) ;
26+ _ . extend ( commonOptions . shorthands , shorthands ) ;
2827
2928var defaultProfileDir = "" ;
3029var nativeScriptCacheFolder = ".nativescript-cli" ;
@@ -35,15 +34,9 @@ if(hostInfo.isWindows()) {
3534}
3635
3736commonOptions . setProfileDir ( defaultProfileDir ) ;
38- var parsed = helpers . getParsedOptions ( knownOpts , shorthands , "nativescript" ) ;
39-
40- Object . keys ( parsed ) . forEach ( opt => {
41- var key = opt ;
42- if ( shorthands [ opt ] ) {
43- key = shorthands [ opt ] ;
44- }
45-
46- exports [ key ] = parsed [ opt ] ;
37+ _ ( commonOptions . validateArgs ( "nativescript" ) ) . each ( ( val , key ) => {
38+ key = shorthands [ key ] || key ;
39+ commonOptions [ key ] = val ;
4740} ) ;
4841exports . knownOpts = knownOpts ;
4942
0 commit comments