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:
+24
-22
@@ -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')
|
||||
});
|
||||
Reference in New Issue
Block a user