Skip to content

Commit d975201

Browse files
committed
chore: rename out tgz file to nativescript-angular-compat.tgz
1 parent 1cb22db commit d975201

File tree

2 files changed

+33
-25
lines changed

2 files changed

+33
-25
lines changed

build/pack-scripts/pack-compat.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ fs.emptyDirSync(distFolderPath);
2525
// cd to dist folder
2626
execSync(`npm pack ${nsAngularPackagePath}`, {
2727
cwd: distFolderPath
28-
});
28+
});
29+
30+
const fileName = fs.readdirSync(distFolderPath)[0];
31+
const newName = "nativescript-angular-compat.tgz";
32+
// rename file
33+
fs.moveSync(`${distFolderPath}/${fileName}`, `${distFolderPath}/${newName}`);

build/pack-scripts/pack-scoped.ts

+27-24
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
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";
44

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}`);
88

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);
1313

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));
1818

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

Comments
 (0)