1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var transpile_1 = require("./transpile");
|
4 | var context = {};
|
5 | process.on('message', function (incomingMsg) {
|
6 | context.rootDir = incomingMsg.rootDir;
|
7 | context.buildDir = incomingMsg.buildDir;
|
8 | var workerConfig = {
|
9 | configFile: incomingMsg.configFile,
|
10 | writeInMemory: false,
|
11 | sourceMaps: false,
|
12 | cache: false,
|
13 | inlineTemplate: false,
|
14 | useTransforms: false
|
15 | };
|
16 | transpile_1.transpileWorker(context, workerConfig)
|
17 | .then(function () {
|
18 | var outgoingMsg = {
|
19 | transpileSuccess: true
|
20 | };
|
21 | process.send(outgoingMsg);
|
22 | })
|
23 | .catch(function () {
|
24 | var outgoingMsg = {
|
25 | transpileSuccess: false
|
26 | };
|
27 | process.send(outgoingMsg);
|
28 | });
|
29 | });
|