1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-22 08:11:34 +03:00
leon/scripts/app/build-app.js

19 lines
403 B
JavaScript
Raw Normal View History

2019-02-10 15:26:50 +03:00
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()
})