File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,17 @@ export class ProjectService implements IProjectService {
76
76
this . $logger . trace ( "Copying NativeScript hello world application into %s" , appDirectory ) ;
77
77
appPath = defaultTemplatePath ;
78
78
}
79
-
79
+
80
+ var tnsModulesVersion : string = null ;
81
+ // Optional parameter has a higher priority than defined version in package.json
82
+ if ( this . $options . tnsModulesVersion ) {
83
+ tnsModulesVersion = this . $options . tnsModulesVersion ;
84
+ }
85
+ else {
86
+ var coreModulesName = this . $tnsModulesService . NPM_TNS_CORE_MODULES_NAME ;
87
+ tnsModulesVersion = this . $fs . readJson ( path . join ( appPath , constants . PACKAGE_JSON_FILE_NAME ) ) . wait ( ) [ coreModulesName ] [ "version" ] ;
88
+ }
89
+
80
90
// Download tns-core-modules via npm and get destination file path
81
91
var tnsModulesResourcePath = this . $tnsModulesService . tnsModulesInstallationPath ( tnsModulesVersion ) . wait ( ) ;
82
92
You can’t perform that action at this time.
0 commit comments