forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: convert release package build scripts to typescript (angular#4…
…6456) Follow-up to: cce395a. PR Close angular#46456
- Loading branch information
1 parent
2d713f5
commit d248d83
Showing
25 changed files
with
258 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {join} from 'path'; | ||
import sh from 'shelljs'; | ||
|
||
import {projectDir, bazelCmd, exec} from './package-builder.mjs'; | ||
|
||
/** | ||
* Build the `angular-in-memory-web-api` npm package and copies it into the release | ||
* distribution directory. | ||
* | ||
* NOTE: The `angular-in-memory-web-api` package is not built as part of `package-builder`'s | ||
* `buildTargetPackages()` nor is it copied into the same directory as the Angular packages (e.g. | ||
* `dist/packages-dist/`) despite its source's being inside `packages/`, because it is not | ||
* published to npm under the `@angular` scope (as happens for the rest of the packages). | ||
* | ||
* @param {string} destDir Path to the output directory into which we copy the npm package. | ||
* This path should either be absolute or relative to the project root. | ||
*/ | ||
export function buildAngularInMemoryWebApiPackage(destDir: string): void { | ||
console.info('##############################'); | ||
console.info(' Building angular-in-memory-web-api npm package'); | ||
console.info('##############################'); | ||
|
||
exec(`${bazelCmd} build //packages/misc/angular-in-memory-web-api:npm_package`); | ||
|
||
// Create the output directory. | ||
if (!sh.test('-d', destDir)) { | ||
sh.mkdir('-p', destDir); | ||
} | ||
|
||
const bazelBinPath = exec(`${bazelCmd} info bazel-bin`, true); | ||
|
||
// Copy artifacts to `destDir`, so they can be easier persisted on CI and used by non-bazel | ||
// scripts/tests. | ||
const buildOutputDir = join(bazelBinPath, 'packages/misc/angular-in-memory-web-api/npm_package'); | ||
const distTargetDir = join(destDir, 'angular-in-memory-web-api'); | ||
|
||
console.info(`# Copy npm_package artifacts to ${distTargetDir}`); | ||
|
||
sh.rm('-rf', distTargetDir); | ||
sh.cp('-R', buildOutputDir, distTargetDir); | ||
sh.chmod('-R', 'u+w', distTargetDir); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.