1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-06 03:57:53 +08:00

refine script and css

This commit is contained in:
Pan 2019-03-25 17:57:14 +08:00
parent 297959083c
commit b9fd5ae6d3
3 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,7 @@ const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ') const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) { if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
run(`vue-cli-service build ${args}`) run(`vue-cli-service build ${args} --report`)
const port = 9526 const port = 9526
const publicPath = config.publicPath const publicPath = config.publicPath
@ -23,7 +23,10 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
app.listen(port, function() { app.listen(port, function() {
console.log( console.log(
chalk.green(`> Listening at http://localhost:${port}${publicPath}`) chalk.green(`> Preview at http://localhost:${port}${publicPath}`)
)
console.log(
chalk.green(`> Report at http://localhost:${port}${publicPath}/report.html`)
) )
}) })
} else { } else {

View File

@ -8,8 +8,7 @@
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"build:preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"build:report": "node build/index.js --report",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",
"test": "npm run lint", "test": "npm run lint",
"test:unit": "vue-cli-service test:unit", "test:unit": "vue-cli-service test:unit",

View File

@ -42,7 +42,7 @@ export default {
} }
.fixed-header+.app-main { .fixed-header+.app-main {
padding-top: 80px; padding-top: 84px;
} }
} }
</style> </style>