Skip to content

Commit 327cc69

Browse files
committed
feat: refactor
1 parent 0d8599d commit 327cc69

37 files changed

+19762
-2266
lines changed

.circleci/config.yml

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

.eslintrc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,4 @@ module.exports = {
77
extends: [
88
"eslint-config-2o3t"
99
],
10-
parserOptions: {
11-
parser: "babel-eslint"
12-
},
1310
}

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @zyao89

.github/workflows/coveralls.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Coveralls
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
- develop
10+
jobs:
11+
install-and-coveralls:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@master
17+
18+
- name: Cache node modules
19+
uses: actions/cache@v1
20+
with:
21+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
23+
restore-keys: |
24+
${{ runner.os }}-build-${{ env.cache-name }}-
25+
${{ runner.os }}-build-
26+
${{ runner.os }}-
27+
28+
- name: install
29+
run: yarn --network-timeout 600000
30+
31+
- name: yarn add coveralls
32+
run: |
33+
yarn add -D coveralls
34+
yarn run test --coverage && cat ./coverage/lcov.info
35+
env:
36+
MICRO_APP_TEST: true
37+
38+
- name: Coveralls
39+
uses: coverallsapp/github-action@master
40+
with:
41+
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,7 @@ dist
8686
*.njsproj
8787
*.sln
8888
*.sw*
89+
90+
91+
# custom
92+
microapp/.temp

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

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

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
16-
[npm-img]: https://img.shields.io/npm/v/@micro-app/plugin-vue-cli.svg?style=flat-square
17-
[npm-url]: https://npmjs.org/package/@micro-app/plugin-vue-cli
18-
[download-img]: https://img.shields.io/npm/dm/@micro-app/plugin-vue-cli.svg?style=flat-square
19-
[download-url]: https://npmjs.org/package/@micro-app/plugin-vue-cli
12+
[Coverage-img]: https://coveralls.io/repos/github/MicroAppJS/vue-cli/badge.svg?branch=master
13+
[Coverage-url]: https://coveralls.io/github/MicroAppJS/vue-cli?branch=master
14+
[CircleCI-img]: https://circleci.com/gh/MicroAppJS/vue-cli/tree/master.svg?style=svg
15+
[CircleCI-url]: https://circleci.com/gh/MicroAppJS/vue-cli/tree/master
16+
[npm-img]: https://img.shields.io/npm/v/@micro-app/vue-cli.svg?style=flat-square
17+
[npm-url]: https://npmjs.org/package/@micro-app/vue-cli
18+
[download-img]: https://img.shields.io/npm/dm/@micro-app/vue-cli.svg?style=flat-square
19+
[download-url]: https://npmjs.org/package/@micro-app/vue-cli
2020

2121
## Install
2222

2323
```sh
24-
yarn add @micro-app/plugin-vue-cli
24+
yarn add @micro-app/vue-cli
2525
```
2626

2727
or
2828

2929
```sh
30-
npm install -S @micro-app/plugin-vue-cli
30+
npm install -S @micro-app/vue-cli
3131
```
3232

3333
## Usage
3434

35-
### 在项目 `根目录``micro-app.config.js` 文件中配置
36-
37-
```js
38-
module.exports = {
39-
// ...
40-
41-
plugins: [ // 自定义插件
42-
['@micro-app/plugin-vue-cli', {
43-
// root: 1,
44-
}],
45-
],
46-
};
47-
```
35+
可通过配置 `process.env.VUE_CLI_SERVICE_CONFIG_PATH` 设置配置文件路径

bin/micro-app-vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env node
22
'use strict';
33

4-
const { cmd, argv, service } = require('@micro-app/cli/bin/base');
4+
const { argv, service } = require('@micro-app/cli');
55

6-
const ncmd = cmd && `vue-service-${cmd}` || cmd;
6+
// 注册插件
7+
require('../src')(service);
78

8-
service.run(ncmd, argv);
9+
service.run('vue', argv);

bin/micro-app-vue-service

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const { argv, service } = require('@micro-app/cli');
5+
6+
// 注册插件
7+
require('../src')(service);
8+
9+
service.run('vue-service', argv);

microapp/config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict';
2+
3+
const config = {
4+
type: '', // types 类型
5+
};
6+
7+
config.plugins = [
8+
'@micro-app/plugin-deploy', // test
9+
];
10+
11+
module.exports = config;

0 commit comments

Comments
 (0)