File tree 1 file changed +11
-6
lines changed
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");
14
14
const packageJsonPath = path . resolve ( `${ nsAngularPackagePath } /package.json` ) ;
15
15
console . log ( "Getting package.json from" , packageJsonPath ) ;
16
16
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 } ` , {
23
28
cwd : nsAngularPackagePath
24
29
} ) ;
25
30
You can’t perform that action at this time.
0 commit comments