PluginProbe
Plugin Detective – Troubleshooting Conflicts / 1.1.4
Plugin Detective – Troubleshooting Conflicts v1.1.4
1.2.35 1.2.33 1.2.32 1.2.31 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2 1.2.1 1.2.10 1.2.12 1.2.13 1.2.14 1.2.16 1.2.19 1.2.20 1.2.22 1.2.23 1.2.24 All 54 releases
plugin-detective / troubleshoot / app / build / build.js

build.js in Plugin Detective – Troubleshooting Conflicts 1.1.4, at troubleshoot/app/build/build.js

41 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 require('./check-versions')()
2
3 process.env.NODE_ENV = 'production'
4
5 var ora = require('ora')
6 var rm = require('rimraf')
7 var path = require('path')
8 var chalk = require('chalk')
9 var webpack = require('webpack')
10 var config = require('../config')
11 var webpackConfig = require('./webpack.prod.conf')
12
13 var spinner = ora('building for production...')
14 spinner.start()
15
16 rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
17 if (err) throw err
18 webpack(webpackConfig, function (err, stats) {
19 spinner.stop()
20 if (err) throw err
21 process.stdout.write(stats.toString({
22 colors: true,
23 modules: false,
24 children: false,
25 chunks: false,
26 chunkModules: false
27 }) + '\n\n')
28
29 if (stats.hasErrors()) {
30 console.log(chalk.red(' Build failed with errors.\n'))
31 process.exit(1)
32 }
33
34 console.log(chalk.cyan(' Build complete.\n'))
35 console.log(chalk.yellow(
36 ' Tip: built files are meant to be served over an HTTP server.\n' +
37 ' Opening index.html over file:// won\'t work.\n'
38 ))
39 })
40 })
41