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

- create transpiled umd module

- breaking changes for requireJS
	- /umd/vue-select moved to /dist/vue-select
This commit is contained in:
Jeff Sagal
2016-07-04 13:00:35 -07:00
parent b1d48562b4
commit 005f941834
15 changed files with 62 additions and 167 deletions
+2 -36
View File
@@ -6,26 +6,17 @@ var path = require('path')
var config = require('../config')
var ora = require('ora')
var webpack = require('webpack')
var ghpages = require('gh-pages')
var webpackConfig = require('./webpack.prod.conf')
var umdConfig = require('./webpack.umd.conf')
console.log(
' Tip:\n' +
' Built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
)
var spinner = ora('building for production...')
var spinner = ora('building UMD module...')
spinner.start()
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
rm('-rf', assetsPath)
mkdir('-p', assetsPath)
cp('-R', 'static/', assetsPath)
/**
* Build the /dist/ folder (demo site)
* Build the /dist/ folder
*/
webpack(webpackConfig, function (err, stats) {
spinner.stop()
@@ -37,29 +28,4 @@ webpack(webpackConfig, function (err, stats) {
chunks: false,
chunkModules: false
}) + '\n')
// $ npm run build publish
// This will publish /dist/ to the gh-pages
if (( process.argv.indexOf('publish') > 1 )) {
spinner = ora('Publishing to GitHub Pages...').start()
ghpages.publish(path.join(__dirname, '../dist'), function (err) {
spinner.stop()
if (err) throw err
});
}
})
/**
* Build the UMD module @ /umd/vue-select.js.
*/
webpack(umdConfig, 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')
})