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 https://github.com/bazelbuild/rules_nodejs/commit/bc36519 PR Close #39636
This commit is contained in:
		
							parent
							
								
									eee878c00e
								
							
						
					
					
						commit
						fbfc7dff48
					
				| @ -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,10 +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.
 | ||||
|   exec(`npm pack ${buildOutputDir}`, false, {cwd: baseDir}); | ||||
| 
 | ||||
|   console.info(`# Copy npm_package artifacts to ${distTargetDir}`); | ||||
|   rm('-rf', distTargetDir); | ||||
|   cp('-R', buildOutputDir, distTargetDir); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user