Skip to content

Commit bc595d2

Browse files
committed
:feat: update
1 parent 092eff5 commit bc595d2

File tree

15 files changed

+472
-307
lines changed

15 files changed

+472
-307
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019-present, Zyao89
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
[![NPM Version][npm-img]][npm-url]
1010
[![NPM Download][download-img]][download-url]
1111

12-
[Coverage-img]: https://coveralls.io/repos/github/MicrosApp/MicroApp-Plugin-Vue-CLI/badge.svg?branch=master
13-
[Coverage-url]: https://coveralls.io/github/MicrosApp/MicroApp-Plugin-Vue-CLI?branch=master
14-
[CircleCI-img]: https://circleci.com/gh/MicrosApp/MicroApp-Plugin-Vue-CLI/tree/master.svg?style=svg
15-
[CircleCI-url]: https://circleci.com/gh/MicrosApp/MicroApp-Plugin-Vue-CLI/tree/master
12+
[Coverage-img]: https://coveralls.io/repos/github/MicroAppJS/MicroApp-Plugin-Vue-CLI/badge.svg?branch=master
13+
[Coverage-url]: https://coveralls.io/github/MicroAppJS/MicroApp-Plugin-Vue-CLI?branch=master
14+
[CircleCI-img]: https://circleci.com/gh/MicroAppJS/MicroApp-Plugin-Vue-CLI/tree/master.svg?style=svg
15+
[CircleCI-url]: https://circleci.com/gh/MicroAppJS/MicroApp-Plugin-Vue-CLI/tree/master
1616
[npm-img]: https://img.shields.io/npm/v/@micro-app/plugin-vue-cli.svg?style=flat-square
1717
[npm-url]: https://npmjs.org/package/@micro-app/plugin-vue-cli
1818
[download-img]: https://img.shields.io/npm/dm/@micro-app/plugin-vue-cli.svg?style=flat-square
File renamed without changes.

micro-app.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = {
3434
plugins: [
3535
'@micro-app/plugin-webpack-adapter',
3636
[{
37-
id: 'plugin-vue-cli',
37+
id: 'test:plugin-vue-cli',
3838
link: __dirname + '/src/index.js',
3939
}],
4040
],

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "[Plugin] adapter vue cli plugin.",
55
"main": "src/index.js",
66
"bin": {
7-
"micro-app-vue": "./bin/micro-app-vue.js"
7+
"micro-app-vue": "bin/micro-app-vue"
88
},
99
"scripts": {
1010
"test": "jest"
@@ -13,13 +13,13 @@
1313
"src",
1414
"bin"
1515
],
16-
"homepage": "https://github.com/MicrosApp/MicroApp-Plugin-Vue-CLI",
16+
"homepage": "https://github.com/MicroAppJS/MicroApp-Plugin-Vue-CLI",
1717
"repository": {
1818
"type": "git",
19-
"url": "git+https://github.com/MicrosApp/MicroApp-Plugin-Vue-CLI.git"
19+
"url": "git+https://github.com/MicroAppJS/MicroApp-Plugin-Vue-CLI.git"
2020
},
2121
"bugs": {
22-
"url": "https://github.com/MicrosApp/MicroApp-Plugin-Vue-CLI/issues"
22+
"url": "https://github.com/MicroAppJS/MicroApp-Plugin-Vue-CLI/issues"
2323
},
2424
"keywords": [
2525
"micro",
@@ -43,13 +43,14 @@
4343
"@micro-app/core": "^0.2.0-beta.6",
4444
"@micro-app/plugin-webpack-adapter": "^0.1.0-beta.4",
4545
"@types/jest": "^24.0.18",
46+
"babel-eslint": "^10.0.3",
4647
"coveralls": "^3.0.7",
4748
"eslint": "^5.16.0",
4849
"eslint-config-2o3t": "^1.1.17",
4950
"jest": "^24.9.0",
5051
"vue-template-compiler": "^2.0.0"
5152
},
5253
"dependencies": {
53-
"@vue/cli-service": "^3.11.0"
54+
"@vue/cli-service": "^4.0.3"
5455
}
5556
}

src/commands/version.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Command version', () => {
1515
link: path.join(__dirname, './version.js'),
1616
});
1717

18-
const plugin = service.plugins.find(item => item.id === 'cli:plugins-commands-version');
18+
const plugin = service.plugins.find(item => item.id === 'cli:plugin-command-version');
1919
expect(typeof plugin).toEqual('object');
2020

2121
service.init();

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = function VueCLIAdapter(api, opts = {}) {
4747
return config;
4848
});
4949

50-
api.modifyWebpcakConfig(config => {
50+
api.modifyWebpackConfig(config => {
5151
return api.applyPluginHooks('configureWebpack', config);
5252
});
5353

src/index.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const path = require('path');
66

77
describe('Plugin VueCLIAdapter', () => {
88

9-
it('VueCLIAdapter', () => {
9+
it('VueCLIAdapter', async () => {
1010
const { service } = require('@micro-app/cli/bin/base');
1111
// service.registerPlugin({
1212
// id: '@micro-app/plugin-webpack-adapter',
@@ -16,10 +16,10 @@ describe('Plugin VueCLIAdapter', () => {
1616
// link: path.join(__dirname, './index.js'),
1717
// });
1818

19-
service.run('help', { _: [] });
19+
await service.run('help', { _: [] });
2020
});
2121

22-
it('resolveWebpackConfig', () => {
22+
it('resolveWebpackConfig', async () => {
2323
const { service } = require('@micro-app/cli/bin/base');
2424
// service.registerPlugin({
2525
// id: '@micro-app/plugin-webpack-adapter',
@@ -39,10 +39,10 @@ describe('Plugin VueCLIAdapter', () => {
3939
},
4040
});
4141

42-
service.run('help', { _: [] });
42+
await service.run('help', { _: [] });
4343
});
4444

45-
it('vue:serve', () => {
45+
it('vue:serve', async () => {
4646
const { service } = require('@micro-app/cli/bin/base');
4747
// service.registerPlugin({
4848
// id: '@micro-app/plugin-webpack-adapter',
@@ -53,10 +53,10 @@ describe('Plugin VueCLIAdapter', () => {
5353
// });
5454

5555
// service.run('vue-service-serve', { _: [] });
56-
service.run('help', { _: [ 'vue-service-serve' ] });
56+
await service.run('help', { _: [ 'vue-service-serve' ] });
5757
});
5858

59-
it('vue:build', () => {
59+
it('vue:build', async () => {
6060
const { service } = require('@micro-app/cli/bin/base');
6161
// service.registerPlugin({
6262
// id: '@micro-app/plugin-webpack-adapter',
@@ -67,10 +67,10 @@ describe('Plugin VueCLIAdapter', () => {
6767
// });
6868

6969
// service.run('vue-service-build', { _: [] });
70-
service.run('help', { _: [ 'vue-service-build' ] });
70+
await service.run('help', { _: [ 'vue-service-build' ] });
7171
});
7272

73-
it('vue:inspect', () => {
73+
it('vue:inspect', async () => {
7474
const { service } = require('@micro-app/cli/bin/base');
7575
// service.registerPlugin({
7676
// id: '@micro-app/plugin-webpack-adapter',
@@ -80,7 +80,7 @@ describe('Plugin VueCLIAdapter', () => {
8080
// link: path.join(__dirname, './index.js'),
8181
// });
8282

83-
service.run('vue-service-inspect', { _: [] });
83+
await service.run('vue-service-inspect', { _: [] });
8484
});
8585

8686
});

src/methods.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function Methods(api, projectOptions) {
2525
}
2626
api.registerPlugin({
2727
...options,
28-
id: `vue-service:plugins-${id}`,
28+
id: `vue-service:plugin-${id}`,
2929
opts: Object.assign({}, projectOptions, opts), // vue.config.js
3030
});
3131
});

src/plugins/commandPlugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = function CommandPlugins(api, vueRoot, projectOptions) {
1212

1313
// register
1414
api.registerVuePlugin({
15-
id: `vue-service:plugins-command-${name}`,
15+
id: `vue-service:plugin-command-${name}`,
1616
link: require.resolve(path.resolve(vueRoot, 'commands', name)),
1717
description: `[vue-service] command - ${name}`,
1818
});

0 commit comments

Comments
 (0)