mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
bd341f3ffc
Former-commit-id: e47639684bbb1b4d0a15ac8c39dbb0040ae86226 [formerly 3343000db072beb88cec31bb52b139313469f612] [formerly 062dd709613b5784dc8e9b2f327df3cd4c95dc75 [formerly 69d8cd6343
]]
Former-commit-id: 1c0ebd340266b2020ffba94d2370dbf7c98d1aa6 [formerly fcf840509a0f782b8460fb354aed513dbaa10aa2]
Former-commit-id: bd4e275034627c7ff9c8b60c1405ce6aed912761
32 lines
771 B
JavaScript
32 lines
771 B
JavaScript
require('./check-versions')()
|
|
|
|
process.env.NODE_ENV = 'production'
|
|
|
|
var ora = require('ora')
|
|
var rm = require('rimraf')
|
|
var path = require('path')
|
|
var chalk = require('chalk')
|
|
var webpack = require('webpack')
|
|
var config = require('./config')
|
|
var webpackConfig = require('./webpack.prod.conf')
|
|
|
|
var spinner = ora('building for production...')
|
|
spinner.start()
|
|
|
|
rm(path.join(config.assetsRoot, config.assetsSubDirectory), err => {
|
|
if (err) throw err
|
|
webpack(webpackConfig, function (err, stats) {
|
|
spinner.stop()
|
|
if (err) throw err
|
|
process.stdout.write(stats.toString({
|
|
colors: true,
|
|
modules: false,
|
|
children: false,
|
|
chunks: false,
|
|
chunkModules: false
|
|
}) + '\n\n')
|
|
|
|
console.log(chalk.cyan(' Build complete.\n'))
|
|
})
|
|
})
|