Skip to content

Commit

Permalink
feat(ui): client addons, ipc, shared data, plugin actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 8, 2018
1 parent fd7868c commit 3c59d6f
Show file tree
Hide file tree
Showing 69 changed files with 2,506 additions and 58 deletions.
5 changes: 5 additions & 0 deletions .postcssrc
@@ -0,0 +1,5 @@
{
"plugins": {
"autoprefixer": {}
}
}
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-eslint/ui.js
Expand Up @@ -68,7 +68,7 @@ module.exports = api => {
description: 'Do not fix errors'
}
],
onRun: ({ answers, args }) => {
onBeforeRun: ({ answers, args }) => {
if (answers.noFix) {
args.push('--no-fix')
}
Expand Down
8 changes: 8 additions & 0 deletions packages/@vue/cli-service/lib/commands/build/index.js
Expand Up @@ -97,6 +97,14 @@ module.exports = (api, options) => {
targetDir
)

// Expose advanced stats
if (args.dashboard) {
const DashboardPlugin = require('../../webpack/DashboardPlugin')
;(webpackConfig.plugins = webpackConfig.plugins || []).push(new DashboardPlugin({
type: 'build'
}))
}

return new Promise((resolve, reject) => {
rimraf(targetDir, err => {
if (err) {
Expand Down
10 changes: 10 additions & 0 deletions packages/@vue/cli-service/lib/commands/serve.js
Expand Up @@ -49,6 +49,16 @@ module.exports = (api, options) => {
return portPromise.then(port => new Promise((resolve, reject) => {
const webpackConfig = api.resolveWebpackConfig()

// Expose advanced stats
if (args.dashboard) {
const DashboardPlugin = require('../webpack/DashboardPlugin')
;(webpackConfig.plugins = webpackConfig.plugins || []).push(new DashboardPlugin({
type: 'serve',
gzip: false,
minified: false
}))
}

const urls = prepareURLs(
useHttps ? 'https' : 'http',
host,
Expand Down

0 comments on commit 3c59d6f

Please sign in to comment.