2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

update build process for docs

This commit is contained in:
Jeff
2018-01-15 15:25:22 -08:00
parent e236c47300
commit 17312da2fa
7 changed files with 132 additions and 26 deletions
+24 -22
View File
@@ -1,31 +1,33 @@
// https://github.com/shelljs/shelljs
require('shelljs/global')
env.NODE_ENV = 'production'
require('shelljs/global');
env.NODE_ENV = 'production';
var path = require('path')
var config = require('../config')
var ora = require('ora')
var webpack = require('webpack')
var webpackConfig = require('./webpack.prod.conf')
var path = require('path');
var config = require('../config');
var ora = require('ora');
var webpack = require('webpack');
var utils = require('./utils');
var webpackConfig = utils.shouldBuildHomepage() ? require('./webpack.site.conf') : require('./webpack.prod.conf');
var spinner = ora('building UMD module...')
spinner.start()
var text = utils.shouldBuildHomepage() ? 'homepage' : 'vue-select UMD module';
var spinner = ora(`building ${text}...`);
spinner.start();
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
rm('-rf', assetsPath)
mkdir('-p', assetsPath)
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory);
rm('-rf', assetsPath);
mkdir('-p', assetsPath);
/**
* Build the /dist/ folder
*/
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')
})
spinner.stop();
if (err) throw err;
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n')
});