MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / initWorker

Method initWorker

lib/BuildConfigManager.js:36–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 initWorker() {
37 if (this._fs.existsSync(this._buildConfigPath)) {
38 this._worker = fork(this._buildConfigPath, [], { cwd: this._workDir });
39 this._worker.on('message', (message) => {
40 if (message === 'ready') {
41 this._workerIsReady = true;
42 this._onReadyCallbacks.forEach((callback) => callback());
43 }
44 });
45 }
46 return this;
47 }
48
49 stopWorker(signal = 'SIGTERM') {
50 this._worker.kill(signal);

Callers 3

constructorMethod · 0.80
startBrowserSyncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected