electron/spec/ts-smoke/runner.js
Shelley Vohr 319c2853df chore: move ts-smoke tests to core (#16930)
* chore: move ts smoke tests to core

* fix: fix paths for tsconfig / ts-smoke runner

* update ts-defs version

* do not lintr
2019-02-13 15:24:28 -08:00

18 lines
582 B
JavaScript

const path = require('path')
const childProcess = require('child_process')
const typeCheck = () => {
const tscExec = path.resolve(require.resolve('typescript'), '../../bin/tsc')
const tscChild = childProcess.spawn(process.execPath, [tscExec, '--project', './ts-smoke/tsconfig.json'], {
cwd: path.resolve(__dirname, '../')
})
tscChild.stdout.on('data', d => console.log(d.toString()))
tscChild.stderr.on('data', d => console.error(d.toString()))
tscChild.on('exit', (tscStatus) => {
if (tscStatus !== 0) {
process.exit(tscStatus)
}
})
}
typeCheck()