Skip to content

Commit 5d66647

Browse files
committed
feat: support timeout option
1 parent 43eb2ba commit 5d66647

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/nx/src/executors/build/schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
"default": false,
4141
"description": "Enable verbose logging"
4242
},
43+
"timeout": {
44+
"type": "number",
45+
"default": -1,
46+
"description": "Increase the default 90s timeout to connect to a device/simulator"
47+
},
4348
"release": {
4449
"type": "boolean",
4550
"default": false,

packages/nx/src/utils/executors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface BuildExecutorSchema {
1111
emulator?: boolean;
1212
clean?: boolean;
1313
noHmr?: boolean;
14+
timeout?: number;
1415
uglify?: boolean;
1516
verbose?: boolean;
1617
release?: boolean;
@@ -169,6 +170,9 @@ export function commonExecutor(options: BuildExecutorSchema | TestExecutorSchema
169170
if (options.noHmr) {
170171
nsOptions.push('--no-hmr');
171172
}
173+
if (options.timeout && options.timeout > -1) {
174+
nsOptions.push(`--timeout=${options.timeout}`);
175+
}
172176
if (options.uglify) {
173177
nsOptions.push('--env.uglify');
174178
}

0 commit comments

Comments
 (0)