Skip to content

Commit fbfc7df

Browse files
JiaLiPassionmhevery
authored andcommitted
build: update to use npm_package.pack rule (#39636)
Remove the work around solution for the `npm pack`, we can now use `npm_package.pack` rule of bazel, since the windows os issue has been fixed here bazel-contrib/rules_nodejs@bc36519 PR Close #39636
1 parent eee878c commit fbfc7df

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scripts/build/zone-js-builder.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function buildZoneJsPackage(destPath) {
3535
console.info(`${scriptPath}:`);
3636
console.info(' Building zone.js npm package');
3737
console.info('##############################');
38-
exec(`${bazelCmd} build //packages/zone.js:npm_package`);
38+
exec(`${bazelCmd} run //packages/zone.js:npm_package.pack`);
3939

4040
// Create the output directory.
4141
const absDestPath = resolve(baseDir, destPath);
@@ -46,10 +46,6 @@ function buildZoneJsPackage(destPath) {
4646
const buildOutputDir = `${bazelBin}/packages/zone.js/npm_package`;
4747
const distTargetDir = `${absDestPath}/zone.js`;
4848

49-
// Also create an archive so we can test the package itself.
50-
// Currently, the `npm_package.pack` rule does not work on Windows, so run `npm pack` directly.
51-
exec(`npm pack ${buildOutputDir}`, false, {cwd: baseDir});
52-
5349
console.info(`# Copy npm_package artifacts to ${distTargetDir}`);
5450
rm('-rf', distTargetDir);
5551
cp('-R', buildOutputDir, distTargetDir);

0 commit comments

Comments
 (0)