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