Youen Toupin
3 years ago
6 changed files with 37 additions and 18 deletions
@ -1,7 +0,0 @@ |
|||||||
@echo off |
|
||||||
|
|
||||||
pushd src |
|
||||||
node ../tools/embed.js |
|
||||||
node ../node_modules/typescript/lib/tsc.js |
|
||||||
node ../tools/purify.js |
|
||||||
popd |
|
@ -1,6 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
|
|
||||||
cd src |
|
||||||
node ../tools/embed.js |
|
||||||
../node_modules/typescript/bin/tsc |
|
||||||
node ../tools/purify.js |
|
@ -0,0 +1,25 @@ |
|||||||
|
let child_process = require('child_process'); |
||||||
|
|
||||||
|
let toolsDir = __dirname; |
||||||
|
let srcDir = toolsDir + "/../src"; |
||||||
|
let nodeModulesDir = toolsDir + "/../node_modules"; |
||||||
|
|
||||||
|
let commands = [ |
||||||
|
() => child_process.fork(toolsDir + '/embed.js'), |
||||||
|
() => child_process.fork(nodeModulesDir + '/typescript/lib/tsc.js', {'cwd': srcDir}), |
||||||
|
() => child_process.fork(toolsDir + '/purify.js', {'cwd': srcDir}) |
||||||
|
]; |
||||||
|
|
||||||
|
let commandIdx = 0; |
||||||
|
|
||||||
|
function executeCommand(commandIdx) { |
||||||
|
let process = commands[commandIdx](); |
||||||
|
process.on('close', (exitCode) => { |
||||||
|
if(exitCode != 0) throw "Command " + commands[commandIdx] + " failed with code " + exitCode; |
||||||
|
commandIdx += 1; |
||||||
|
if(commandIdx == commands.length) return; |
||||||
|
executeCommand(commandIdx); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
executeCommand(commandIdx); |
Loading…
Reference in new issue