Skip to content

Commit 255a848

Browse files
committed
:feat: fixed config
1 parent a452cb3 commit 255a848

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

microapp/config.js

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

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
"lint:fix": "npm run lint -- --fix",
1010
"test": "jest",
1111
"publish:next": "npm publish --tag next",
12-
"release": "micro-app release",
12+
"release": "micro-app release --npm.skipChecks",
1313
"release:alpha": "npm run release -- --preRelease=alpha",
14-
"release:next": "npm run release -- --preRelease=next"
14+
"release:next": "npm run release -- --preRelease=next",
15+
"release:minor": "npm run release minor",
16+
"release:patch": "npm run release patch"
1517
},
1618
"files": [
1719
"bin",

tests/app.js

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

tests/index.test.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
/* global expect */
4+
5+
describe('koa serve', () => {
6+
7+
const path = require('path');
8+
const { service } = require('@micro-app/cli');
9+
10+
service.registerPlugin({
11+
id: 'test:KoaPlugin',
12+
link: path.join(__dirname, '../src/index.js'),
13+
});
14+
15+
it('serve', async () => {
16+
const result = await service.run('serve');
17+
expect(result).toBeUndefined();
18+
}, 3000);
19+
20+
});

0 commit comments

Comments
 (0)