mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-10 07:00:42 +08:00
* fixed[tagsView]: DEL_OTHERS_VIEWS cachedViews bug (#913) * mutations DEL_OTHERS_VIEWS state.cachedViews -> i type is string slice(begin: number, end: number) * fix[Tinymce]: fixed tinymce upload dialog bug #654 * [release] 3.7.3 * docs: add gitee * perf[login.vue]: Improve input background and cursor color (#927) * 完善input背景和光标色; 1.完善在Chrome浏览器时登陆界面的input标签 使用记住密码之后颜色和背景不一致; 2.目前的rgb值是 #2d3a4b 修改的rgb值是 #283443; 3.修复光标使用Chrome记录的账号之后变黑色; 4.移除 .title-container .title 重复的font-weight: 400; 5.不用IE我们大家都是好朋友!~ * Update index.vue * docs: tweak * tweak * fix: demo links * fixBug[waves.js]: wave's position (#949) * fixBug[waves.js]-wave's position * fix[waves.js]-wave's position * fix typo(#965) * update to webpack4 (#889) * [release] 3.8.0 * Update README.zh-CN.md * format code * docs: change vueAdmin-template => vue-admin-template
68 lines
1.6 KiB
JavaScript
68 lines
1.6 KiB
JavaScript
'use strict'
|
|
require('./check-versions')()
|
|
|
|
const ora = require('ora')
|
|
const rm = require('rimraf')
|
|
const path = require('path')
|
|
const chalk = require('chalk')
|
|
const webpack = require('webpack')
|
|
const config = require('../config')
|
|
const webpackConfig = require('./webpack.prod.conf')
|
|
var connect = require('connect')
|
|
var serveStatic = require('serve-static')
|
|
|
|
const spinner = ora(
|
|
'building for ' + process.env.env_config + ' environment...'
|
|
)
|
|
spinner.start()
|
|
|
|
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
|
if (err) throw err
|
|
webpack(webpackConfig, (err, stats) => {
|
|
spinner.stop()
|
|
if (err) throw err
|
|
process.stdout.write(
|
|
stats.toString({
|
|
colors: true,
|
|
modules: false,
|
|
children: false,
|
|
chunks: false,
|
|
chunkModules: false
|
|
}) + '\n\n'
|
|
)
|
|
|
|
if (stats.hasErrors()) {
|
|
console.log(chalk.red(' Build failed with errors.\n'))
|
|
process.exit(1)
|
|
}
|
|
|
|
console.log(chalk.cyan(' Build complete.\n'))
|
|
console.log(
|
|
chalk.yellow(
|
|
' Tip: built files are meant to be served over an HTTP server.\n' +
|
|
" Opening index.html over file:// won't work.\n"
|
|
)
|
|
)
|
|
|
|
if (process.env.npm_config_preview) {
|
|
const port = 9526
|
|
const host = 'http://localhost:' + port
|
|
const basePath = config.build.assetsPublicPath
|
|
const app = connect()
|
|
|
|
app.use(
|
|
basePath,
|
|
serveStatic('./dist', {
|
|
index: ['index.html', '/']
|
|
})
|
|
)
|
|
|
|
app.listen(port, function() {
|
|
console.log(
|
|
chalk.green(`> Listening at http://localhost:${port}${basePath}`)
|
|
)
|
|
})
|
|
}
|
|
})
|
|
})
|