File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,17 @@ const nsAngularPackagePath = path.resolve("../../nativescript-angular-package");
1414const packageJsonPath = path . resolve ( `${ nsAngularPackagePath } /package.json` ) ;
1515console . log ( "Getting package.json from" , packageJsonPath ) ;
1616
17- // rewrite dependency in package.json
18- const packageJsonObject = JSON . parse ( fs . readFileSync ( packageJsonPath , { encoding : "utf8" } ) ) ;
19- packageJsonObject . dependencies [ "@nativescript/angular" ] = scopedVersion ;
20- fs . writeFileSync ( packageJsonPath , JSON . stringify ( packageJsonObject , null , 4 ) ) ;
21-
22- execSync ( `npm install --save-exact` , {
17+ let npmInstallParams = "" ;
18+ if ( scopedVersion . indexOf ( ".tgz" ) > 0 ) {
19+ // rewrite dependency in package.json
20+ const packageJsonObject = JSON . parse ( fs . readFileSync ( packageJsonPath , { encoding : "utf8" } ) ) ;
21+ packageJsonObject . dependencies [ "@nativescript/angular" ] = scopedVersion ;
22+ fs . writeFileSync ( packageJsonPath , JSON . stringify ( packageJsonObject , null , 4 ) ) ;
23+ } else {
24+ npmInstallParams = `@nativescript/angular@${ scopedVersion } ` ;
25+ }
26+
27+ execSync ( `npm install --save-exact ${ npmInstallParams } ` , {
2328 cwd : nsAngularPackagePath
2429} ) ;
2530
You can’t perform that action at this time.
0 commit comments