Skip to content

Commit cdf9d07

Browse files
author
Guillaume Chau
committed
feat(ui): vue ui command
1 parent dbac02f commit cdf9d07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+216
-162
lines changed

β€Žpackages/@vue/cli-service-global/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"@vue/cli-plugin-babel": "^3.0.0-beta.6",
2626
"@vue/cli-plugin-eslint": "^3.0.0-beta.6",
2727
"@vue/cli-service": "^3.0.0-beta.6",
28+
"@vue/cli-ui": "^3.0.0-beta.6",
29+
"@vue/cli-ui-addon-webpack": "^3.0.0-beta.6",
2830
"chalk": "^2.3.2",
2931
"eslint-plugin-vue": "^4.3.0",
3032
"resolve": "^1.5.0",

β€Žpackages/@vue/cli-service/lib/Service.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ module.exports = class Service {
9191
'./commands/build',
9292
'./commands/inspect',
9393
'./commands/help',
94+
'./commands/ui',
9495
// config plugins are order sensitive
9596
'./config/base',
9697
'./config/css',
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = api => {
2+
api.registerCommand('ui', args => {
3+
api.setMode('production')
4+
5+
let server = require('vue-cli-plugin-apollo/graphql-server')
6+
server = server.default || server
7+
8+
const opts = {
9+
mock: false,
10+
apolloEngine: false,
11+
timeout: 0,
12+
paths: {
13+
typeDefs: require.resolve('@vue/cli-ui/src/graphql-api/type-defs.js'),
14+
resolvers: require.resolve('@vue/cli-ui/src/graphql-api/resolvers.js'),
15+
context: require.resolve('@vue/cli-ui/src/graphql-api/context.js'),
16+
server: require.resolve('@vue/cli-ui/src/graphql-api/server.js')
17+
}
18+
}
19+
20+
server(opts)
21+
})
22+
}

β€Žpackages/@vue/cli-service/ui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,6 @@ module.exports = api => {
202202
// Testing client addon
203203
api.addClientAddon({
204204
id: 'vue-webpack',
205-
url: 'http://localhost:8081/app.js'
205+
path: '@vue/cli-ui-addon-webpack/dist'
206206
})
207207
}
Binary file not shown.

β€Žpackages/@vue/cli-ui-addon-build/public/index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.
Binary file not shown.

β€Žpackages/@vue/cli-ui-addon-build/vue.config.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
Β (0)