mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-22 08:11:34 +03:00
19 lines
403 B
JavaScript
19 lines
403 B
JavaScript
|
import fs from 'fs'
|
||
|
import browserify from 'browserify'
|
||
|
|
||
|
import log from '@/helpers/log'
|
||
|
|
||
|
/**
|
||
|
* Build web app
|
||
|
*/
|
||
|
export default () => new Promise((resolve) => {
|
||
|
browserify('app/js/main.es6.js')
|
||
|
.transform('babelify')
|
||
|
.bundle()
|
||
|
.on('error', err => log.error(`[${err.name}] ${err.message}`))
|
||
|
.pipe(fs.createWriteStream('app/js/main.js'))
|
||
|
|
||
|
log.success('Web app built')
|
||
|
resolve()
|
||
|
})
|