Skip to content

Commit 113c7ce

Browse files
committed
fire: remove plugin config
1 parent 94bd484 commit 113c7ce

File tree

23 files changed

+224
-348
lines changed

23 files changed

+224
-348
lines changed

.circleci/config.yml

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

.github/workflows/coveralls.yml

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

micro-app.config.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
'use strict';
22

3+
const path = require('path');
4+
35
const config = {
46
name: '@micro-app/demo',
57
description: '',
68
version: '0.0.1',
79
type: '', // types 类型
8-
webpack: { // webpack 配置 (只有自己使用)
9-
// output: {
10-
// path: require('path').resolve(__dirname, 'public'),
11-
// publicPath: '/public/',
12-
// },
13-
},
10+
webpack: { }, // webpack 配置 (只有自己使用)
1411

1512
entry: {
16-
main: './test/index.js',
13+
main: './simple/client/main.js',
1714
},
1815

1916
htmls: [
2017
{
21-
template: './test/index.js',
18+
filename: 'index.html',
19+
hash: true,
20+
chunks: [ 'common', 'main' ],
21+
template: './simple/client/index.html',
2222
},
2323
],
2424

25+
outputDir: path.resolve(__dirname, 'dist'),
26+
// publicPath: '/',
27+
2528
// staticPath: '',
2629

2730
// dlls: [
@@ -30,6 +33,8 @@ const config = {
3033
// },
3134
// ],
3235

36+
// devServer: {},
37+
3338
alias: { // 前端
3439
api: 'abc',
3540
config: {
@@ -56,6 +61,8 @@ const config = {
5661

5762
config.plugins = [
5863
__dirname,
64+
'@micro-app/plugin-compatible',
65+
'@micro-app/plugin-deploy', // test
5966
];
6067

6168
module.exports = config;

micro-app.release.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use strict';
2+
3+
// demo config
4+
module.exports = {
5+
hooks: {
6+
'before:init': [
7+
'npm test',
8+
],
9+
},
10+
git: {
11+
commitMessage: 'chore: release v%s',
12+
tagName: 'v%s',
13+
},
14+
npm: {
15+
publish: true,
16+
},
17+
github: {
18+
release: true,
19+
releaseName: 'v%s Released!',
20+
},
21+
plugins: {
22+
'@release-it/conventional-changelog': {
23+
preset: 'angular',
24+
infile: 'CHANGELOG.md',
25+
},
26+
},
27+
};

package.json

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
"micro-app-build": "./bin/micro-app-build"
88
},
99
"scripts": {
10+
"prepublishOnly": "npm run test",
1011
"lint": "eslint .",
1112
"lint:fix": "npm run lint -- --fix",
12-
"test": "jest"
13+
"test": "jest",
14+
"build": "micro-app build",
15+
"dev": "micro-app-dev",
16+
"inspect": "micro-app inspect",
17+
"publish:next": "npm publish --tag next",
18+
"release": "micro-app release",
19+
"release:alpha": "npm run release -- --preRelease=alpha",
20+
"release:next": "npm run release -- --preRelease=next"
1321
},
1422
"files": [
1523
"bin",
@@ -44,30 +52,30 @@
4452
]
4553
},
4654
"peerDependencies": {
47-
"@micro-app/cli": ">=0.3.0"
55+
"@micro-app/cli": ">=0.3.1"
4856
},
4957
"devDependencies": {
50-
"@micro-app/cli": "^0.3.0-alpha.5",
51-
"@types/jest": "^24.0.19",
52-
"babel-eslint": "^10.0.3",
53-
"coveralls": "^3.0.7",
58+
"@micro-app/cli": "^0.3.1",
59+
"@micro-app/plugin-compatible": "0.0.2",
60+
"@types/jest": "^24.9.1",
61+
"babel-eslint": "^10.1.0",
5462
"eslint": "^5.16.0",
5563
"eslint-config-2o3t": "^1.1.17",
56-
"hash-sum": "^2.0.0",
57-
"husky": "^3.0.9",
64+
"html-webpack-plugin": "^3.2.0",
65+
"husky": "^3.1.0",
5866
"jest": "^24.9.0",
59-
"lint-staged": "^9.4.2",
67+
"lint-staged": "^9.5.0",
6068
"webpack": "^4.41.1",
6169
"webpack-dev-server": "^3.9.0"
6270
},
6371
"dependencies": {
64-
"@micro-app/shared-utils": "^0.1.14",
72+
"@micro-app/shared-utils": "^0.1.15",
6573
"address": "^1.1.2",
6674
"cli-highlight": "^2.1.4",
67-
"clipboardy": "^2.1.0",
75+
"clipboardy": "^2.2.0",
6876
"default-gateway": "^5.0.5",
6977
"launch-editor-middleware": "^2.2.1",
7078
"portfinder": "^1.0.25",
71-
"webpack-chain": "^6.0.0"
79+
"webpack-chain": "^6.4.0"
7280
}
7381
}

simple/client/a.png

Lines changed: 1 addition & 0 deletions
Loading

simple/client/api.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
console.log('api');
4+
5+
require('./a.png');

simple/client/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<title>Test</title>
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
</body>
12+
</html>

simple/client/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
// do something
3+
4+
console.warn('main...');
5+
6+
require('./api');
7+

simple/server/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
5+
};

0 commit comments

Comments
 (0)