diff --git a/scripts/build/zone-js-builder.js b/scripts/build/zone-js-builder.js index d91fda767a..41108f7088 100644 --- a/scripts/build/zone-js-builder.js +++ b/scripts/build/zone-js-builder.js @@ -35,7 +35,7 @@ function buildZoneJsPackage(destPath) { console.info(`${scriptPath}:`); console.info(' Building zone.js npm package'); console.info('##############################'); - exec(`${bazelCmd} build //packages/zone.js:npm_package`); + exec(`${bazelCmd} run //packages/zone.js:npm_package.pack`); // Create the output directory. const absDestPath = resolve(baseDir, destPath); @@ -46,12 +46,6 @@ function buildZoneJsPackage(destPath) { const buildOutputDir = `${bazelBin}/packages/zone.js/npm_package`; const distTargetDir = `${absDestPath}/zone.js`; - // Also create an archive so we can test the package itself. - // Currently, the `npm_package.pack` rule does not work on Windows, so run `npm pack` directly. - // - // TODO: Switch to `npm_package.pack`, once we upgrade to `bazelbuild/rules_nodejs` >=2.3.0. - exec(`npm pack ${buildOutputDir}`, false, {cwd: baseDir}); - console.info(`# Copy npm_package artifacts to ${distTargetDir}`); rm('-rf', distTargetDir); cp('-R', buildOutputDir, distTargetDir);