forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ts
More file actions
28 lines (21 loc) · 692 Bytes
/
build.ts
File metadata and controls
28 lines (21 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import signale from 'signale'
import webpack from 'webpack'
import config from '../config/webpack/prod.config'
import * as tasks from './tasks'
const buildChrome = tasks.buildChrome('prod')
const buildFirefox = tasks.buildFirefox('prod')
tasks.copyAssets()
const compiler = webpack(config)
signale.await('Webpack compilation')
compiler.run((err, stats) => {
console.log(stats.toString(tasks.WEBPACK_STATS_OPTIONS))
if (stats.hasErrors()) {
signale.error('Webpack compilation error')
process.exit(1)
}
signale.success('Webpack compilation done')
buildChrome()
buildFirefox()
tasks.copyIntegrationAssets()
signale.success('Build done')
})