1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-19 16:41:44 +03:00
tabby/scripts/build-modules.js

23 lines
579 B
JavaScript
Raw Normal View History

2021-07-04 16:06:27 +03:00
#!/usr/bin/env node
const vars = require('./vars')
const log = require('npmlog')
const webpack = require('webpack')
const { promisify } = require('util')
const configs = [
'../app/webpack.main.config.js',
'../app/webpack.config.js',
2021-07-11 23:59:39 +03:00
...vars.allPackages.map(x => `../${x}/webpack.config.js`),
2021-07-04 16:06:27 +03:00
]
;(async () => {
for (const c of configs) {
log.info('build', c)
2021-08-17 15:30:00 +03:00
const stats = await promisify(webpack)(require(c))
console.log(stats.toString({ colors: true }))
if (stats.hasErrors()) {
process.exit(1)
}
2021-07-04 16:06:27 +03:00
}
})()