Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(progressive):upgrade to egg2.x #49

Merged
merged 6 commits into from Dec 11, 2017
Merged

style(progressive):upgrade to egg2.x #49

merged 6 commits into from Dec 11, 2017

Conversation

SunShinewyf
Copy link
Contributor

  • 书写风格升级到Egg2.x
  • 修改了一下readme
  • 更新了一些依赖

.travis.yml Outdated
@@ -2,11 +2,7 @@ sudo: false
language: node_js
node_js:
- '8'
services:
- postgresql
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件之前咋有这个的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

啊,不知道咋出来的,我看看

@@ -1,18 +1,18 @@
'use strict';


const mm = require('egg-mock');
const { mock } = require('egg-mock/bootstrap')

describe('test/index.test.js', () => {
let app;

before(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要 before after 等了,直接从 bootstrap 里面拿到 app 即可

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以看下最新的骨架

@@ -1,5 +1,6 @@
'use strict';

module.exports = app => {
app.router.get('/', app.controller.home.isIOS);
const {router,controller} = app;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

逗号后面少个空格,是不是 eslintignore 里面忽略了?把 fixture 干掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是eslint的原因,没控制好代码格式,“把fixture干掉”是什么意思,删掉fixture这个目录?

@SunShinewyf SunShinewyf changed the title style(hackernews):upgrade to egg2.x style(progressive):upgrade to egg2.x Dec 9, 2017
@atian25
Copy link
Member

atian25 commented Dec 9, 2017 via email

Copy link
Member

@atian25 atian25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他 +1

return app.ready();
});

after(() => app.close());
afterEach(mock.restore);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afterEach 也是不需要的,可以看看 bootstrap 里面做了啥

.travis.yml Outdated
@@ -3,10 +3,10 @@ language: node_js
node_js:
- '8'
services:
- postgresql
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要缩进的吧,这文件直接回滚不修改就好了


describe('test/framework.test.js', () => {
let app;

before(() => {
app = mm.app({
app = mock.app({
baseDir: 'test-app',
customEgg: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customEgg 改为 framework

@atian25
Copy link
Member

atian25 commented Dec 10, 2017

ci 挂了,少了 config.keys

@@ -7,11 +7,14 @@
},
"devDependencies": {
"egg-bin": "^4.3.5",
"egg-mock": "^3.13.1"
"egg-mock": "^3.13.1",
"autod": "^3.0.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

人肉加的?这里其实不用 autod,都在外面执行的。

@@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"egg": "^1.10.1"
"egg": "^2.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多了个空格

@atian25 atian25 merged commit 1b5569f into master Dec 11, 2017
@atian25 atian25 deleted the progress-2.x branch December 11, 2017 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants