@canopy-iiif/app 1.10.6 → 1.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/orchestrator.js +10 -0
- package/package.json +1 -1
package/lib/orchestrator.js
CHANGED
|
@@ -185,6 +185,7 @@ async function orchestrate(options = {}) {
|
|
|
185
185
|
await prepareUi(mode, env);
|
|
186
186
|
|
|
187
187
|
const api = loadLibraryApi();
|
|
188
|
+
let exitAfterBuild = false;
|
|
188
189
|
try {
|
|
189
190
|
if (mode === 'dev') {
|
|
190
191
|
attachSignalHandlers();
|
|
@@ -196,12 +197,21 @@ async function orchestrate(options = {}) {
|
|
|
196
197
|
await api.build();
|
|
197
198
|
}
|
|
198
199
|
log('Build complete');
|
|
200
|
+
exitAfterBuild = true;
|
|
199
201
|
}
|
|
200
202
|
} finally {
|
|
201
203
|
if (uiWatcherChild && !uiWatcherChild.killed) {
|
|
202
204
|
try { uiWatcherChild.kill(); } catch (_) {}
|
|
203
205
|
}
|
|
204
206
|
}
|
|
207
|
+
|
|
208
|
+
if (exitAfterBuild) {
|
|
209
|
+
try {
|
|
210
|
+
if (!process.exitCode || process.exitCode === 0) process.exit(0);
|
|
211
|
+
} catch (_) {
|
|
212
|
+
process.exit(0);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
205
215
|
}
|
|
206
216
|
|
|
207
217
|
module.exports = {
|