1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-02 11:44:01 +03:00
tabby/scripts/build-native.js

27 lines
719 B
JavaScript
Raw Normal View History

2017-05-01 01:01:12 +03:00
#!/usr/bin/env node
const rebuild = require('electron-rebuild').default
const path = require('path')
const vars = require('./vars')
2019-08-27 12:52:52 +03:00
let lifecycles = []
for (let dir of ['app', 'terminus-core', 'terminus-ssh', 'terminus-terminal']) {
2019-08-27 12:52:52 +03:00
const build = rebuild({
buildPath: path.resolve(__dirname, '../' + dir),
electronVersion: vars.electronVersion,
force: true,
})
build.catch(e => {
console.error(e)
process.exit(1)
})
lifecycles.push([build.lifecycle, dir])
2018-12-15 17:49:06 +03:00
}
console.info('Building against Electron', vars.electronVersion)
2018-08-09 21:53:22 +03:00
2018-12-15 17:49:06 +03:00
for (let [lc, dir] of lifecycles) {
2019-08-27 12:52:52 +03:00
lc.on('module-found', name => {
console.info('Rebuilding', dir + '/' + name)
})
2018-08-09 21:53:22 +03:00
}