2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

update build hooks, bump readme

This commit is contained in:
Jeff Sagal
2016-06-12 14:30:52 -07:00
parent 5c8851f4c7
commit ff1146c82e
4 changed files with 32 additions and 21 deletions
+22 -12
View File
@@ -10,9 +10,9 @@ var ghpages = require('gh-pages')
var webpackConfig = require('./webpack.prod.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'
' 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...')
@@ -24,13 +24,23 @@ mkdir('-p', assetsPath)
cp('-R', 'static/', assetsPath)
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')
// $ 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
});
}
})