Skip to content

Commit 96a93c0

Browse files
committed
fix: comments
1 parent 0a5543b commit 96a93c0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: build/pack-scripts/pack-compat.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ var scopedVersion = process.argv[2];
77
console.log(`Packing nativescript-angular package with @nativescript/angular: ${scopedVersion}`);
88

99
const distFolderPath = path.resolve("../../dist");
10+
const outFileName = "nativescript-angular-compat.tgz";
11+
1012
const nsAngularPackagePath = path.resolve("../../nativescript-angular-package");
1113
const packageJsonPath = path.resolve(`${nsAngularPackagePath}/package.json`);
1214
console.log("Getting package.json from", packageJsonPath);
@@ -16,18 +18,18 @@ const packageJsonObject = JSON.parse(fs.readFileSync(packageJsonPath, { encoding
1618
packageJsonObject.dependencies["@nativescript/angular"] = scopedVersion;
1719
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonObject, null, 4));
1820

19-
// create .tgz in dist folder
2021
execSync(`npm install`, {
2122
cwd: nsAngularPackagePath
2223
});
23-
// ensures empty ../dist folder
24+
25+
// ensure empty dist folder
2426
fs.emptyDirSync(distFolderPath);
25-
// cd to dist folder
27+
28+
// create .tgz
2629
execSync(`npm pack ${nsAngularPackagePath}`, {
2730
cwd: distFolderPath
2831
});
2932

30-
const fileName = fs.readdirSync(distFolderPath)[0];
31-
const newName = "nativescript-angular-compat.tgz";
33+
const currentFileName = fs.readdirSync(distFolderPath)[0];
3234
// rename file
33-
fs.moveSync(`${distFolderPath}/${fileName}`, `${distFolderPath}/${newName}`);
35+
fs.moveSync(`${distFolderPath}/${currentFileName}`, `${distFolderPath}/${outFileName}`);

0 commit comments

Comments
 (0)