Setup circleci (#145)

* Setup circleci
This commit is contained in:
Dominic Gannaway
2021-03-02 14:34:06 +00:00
committed by acywatson
parent 83e19fac6d
commit fbdf867c35
11 changed files with 305 additions and 21 deletions

View File

@ -10,24 +10,20 @@
const {spawn} = require('child_process');
async function runFlow(renderer, args) {
return new Promise(resolve => {
return new Promise((resolve) => {
let cmd = __dirname + '/../../node_modules/.bin/flow';
if (process.platform === 'win32') {
cmd = cmd.replace(/\//g, '\\') + '.cmd';
}
console.log(
'Running Flow...',
);
console.log('Running Flow...');
spawn(cmd, args, {
// Allow colors to pass through:
stdio: 'inherit',
}).on('close', function(code) {
}).on('close', function (code) {
if (code !== 0) {
console.error(
'Flow failed :(',
);
console.error('Flow failed :(');
console.log();
process.exit(code);
} else {