-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(bazel): add an aio fast serve target
This is equivalent to docs-watch in the legacy build.
- Loading branch information
1 parent
9cb9161
commit 2daf369
Showing
7 changed files
with
109 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
This script serves the aio app, watches for changes, | ||
and runs a fast dgeni build on any changed files. | ||
*/ | ||
|
||
const spawn = require("cross-spawn"); | ||
const watchr = require("../tools/transforms/authors-package/watchr.js"); | ||
const architectCli = require.resolve("@angular-devkit/architect-cli/bin/architect"); | ||
|
||
const serve = spawn(architectCli, ["site:serve"], {stdio: "inherit"}); | ||
serve.on("error", error => { | ||
console.error("architect serve script failed"); | ||
console.error(error); | ||
process.exit(1); | ||
}); | ||
serve.on("close", code => { | ||
console.error(`architect serve script exited with code ${code}`); | ||
process.exit(1); | ||
}) | ||
|
||
watchr.watch(true); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
js_library( | ||
name = "watchdocs", | ||
srcs = [ | ||
"api-package.js", | ||
"base-authoring-package.js", | ||
"errors-package.js", | ||
"extended-diagnostics-package.js", | ||
"getting-started-package.js", | ||
"guide-package.js", | ||
"index.js", | ||
"marketing-package.js", | ||
"tutorial-package.js", | ||
"utils.js", | ||
"watchr.js", | ||
], | ||
deps = [ | ||
"//aio/tools/transforms", | ||
"@aio_npm//canonical-path", | ||
"@aio_npm//dgeni", | ||
"@aio_npm//watchr", | ||
], | ||
) |
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