1
- import * as path from "path" ;
2
- import * as fs from "fs-extra" ;
3
- import { execSync } from "child_process" ;
1
+ // import * as path from "path";
2
+ // import * as fs from "fs-extra";
3
+ // import { execSync } from "child_process";
4
4
5
- // var myArgs = process.argv.slice(2);
6
- var scopedVersion = process . argv [ 2 ] ;
7
- console . log ( `Packing nativescript-angular package with @nativescript/angular: ${ scopedVersion } ` ) ;
5
+ // // var myArgs = process.argv.slice(2);
6
+ // var scopedVersion = process.argv[2];
7
+ // console.log(`Packing nativescript-angular package with @nativescript/angular: ${scopedVersion}`);
8
8
9
- const distFolderPath = path . resolve ( "../../dist" ) ;
10
- const nsAngularPackagePath = path . resolve ( "../../nativescript-angular-package" ) ;
11
- const packageJsonPath = path . resolve ( `${ nsAngularPackagePath } /package.json` ) ;
12
- console . log ( "Getting package.json from" , packageJsonPath ) ;
9
+ // const distFolderPath = path.resolve("../../dist");
10
+ // const nsAngularPackagePath = path.resolve("../../nativescript-angular-package");
11
+ // const packageJsonPath = path.resolve(`${nsAngularPackagePath}/package.json`);
12
+ // console.log("Getting package.json from", packageJsonPath);
13
13
14
- // rewrite dependency in package.json
15
- const packageJsonObject = JSON . parse ( fs . readFileSync ( packageJsonPath , { encoding : "utf8" } ) ) ;
16
- packageJsonObject . dependencies [ "@nativescript/angular" ] = scopedVersion ;
17
- fs . writeFileSync ( packageJsonPath , JSON . stringify ( packageJsonObject , null , 4 ) ) ;
14
+ // // rewrite dependency in package.json
15
+ // const packageJsonObject = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: "utf8" }));
16
+ // packageJsonObject.dependencies["@nativescript/angular"] = scopedVersion;
17
+ // fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonObject, null, 4));
18
18
19
- // create .tgz in dist folder
20
- execSync ( `npm install` , {
21
- cwd : nsAngularPackagePath
22
- } ) ;
23
- // ensures empty ../dist folder
24
- fs . emptyDirSync ( distFolderPath ) ;
25
- // cd to dist folder
26
- execSync ( `npm pack ${ nsAngularPackagePath } ` , {
27
- cwd : distFolderPath
28
- } ) ;
19
+ // // create .tgz in dist folder
20
+ // execSync(`npm install`, {
21
+ // cwd: nsAngularPackagePath
22
+ // });
23
+ // // ensures empty ../dist folder
24
+ // fs.emptyDirSync(distFolderPath);
25
+ // // cd to dist folder
26
+ // execSync(`npm pack ${nsAngularPackagePath}`, {
27
+ // cwd: distFolderPath
28
+ // });
29
+
30
+ // console.log("######" + distFolderPath);
31
+ // fs.copySync(distFolderPath + "/nativescript-angular-8.3.0.tgz", distFolderPath + "/nativescript-angular-8.3.0.1.tgz")
0 commit comments