Skip to content

Commit f6f40c3

Browse files
alan-agius4alexeagle
authored andcommitted
fix(examples): add fixes to angular architect
This PR adds; 1) `lint` as a target 2) Changes npm script to use bazelisk 3) Disables `forkTypeChecker` as under Windows this currently errors out with: ``` Error: spawn C:\users\alag\_bazel_alag\jeen2jsq\external\build_bazel_rules_nodejs\internal\node\_node_bin\node ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) { errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn C:\\users\\alag\\_bazel_alag\\jeen2jsq\\external\\build_bazel_rules_nodejs\\internal\\node\\_node_bin\\node', path: 'C:\\users\\alag\\_bazel_alag\\jeen2jsq\\external\\build_bazel_rules_nodejs\\internal\\node\\_node_bin\\node', spawnargs: [ '--require', 'C:/users/alag/_bazel_alag/jeen2jsq/external/build_bazel_rules_nodejs/internal/node/node_patches.js', '--preserve-symlinks', '--preserve-symlinks-main', 'c:\\users\\alag\\_bazel~1\\jeen2jsq\\execroot\\angula~1\\node_modules\\@ngtools\\webpack\\src\\type_checker_worker.js', '9d93e901-158a-4cf9-ba1b-2f0582ffcfeb' ] } ```
1 parent 9da9033 commit f6f40c3

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

examples/angular_bazel_architect/BUILD.bazel

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,26 @@ architect_test(
112112
],
113113
)
114114

115+
architect(
116+
name = "lint",
117+
args = ["frontend:lint"],
118+
data = glob([
119+
"src/**/*",
120+
"e2e/src/**/*",
121+
]) + [
122+
"angular.json",
123+
"tsconfig.json",
124+
"tsconfig.spec.json",
125+
"tsconfig.app.json",
126+
"tslint.json",
127+
"e2e/tsconfig.json",
128+
"@npm//@angular/cli",
129+
"@npm//@angular-devkit/build-angular",
130+
"@npm//codelyzer",
131+
"@npm//tslint",
132+
],
133+
)
134+
115135
architect(
116136
name = "serve",
117137
args = [

examples/angular_bazel_architect/angular.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"build": {
1818
"builder": "@angular-devkit/build-angular:browser",
1919
"options": {
20+
"forkTypeChecker": false,
2021
"preserveSymlinks": true,
2122
"outputPath": "dist/frontend",
2223
"index": "src/index.html",

examples/angular_bazel_architect/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "0.0.0",
44
"scripts": {
55
"ng": "ng",
6-
"start": "ng serve",
7-
"build": "bazel build :build",
8-
"test": "bazel test :test",
9-
"lint": "ng lint",
10-
"e2e": "ng e2e",
6+
"start": "bazelisk run :serve",
7+
"build": "bazelisk build :build",
8+
"test": "bazelisk test :test",
9+
"lint": "bazelisk run :lint",
10+
"e2e": "bazelisk test :e2e",
1111
"postinstall": "patch-package && ngcc --properties es2015 browser module main --first-only"
1212
},
1313
"private": true,

0 commit comments

Comments
 (0)