-
Notifications
You must be signed in to change notification settings - Fork 93
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
Improve #9
+101
−18
Merged
Improve #9
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6b3a610
feat: export FileLoader and ContextLoader
popomore 895073b
feat: initializer can receive the second parameter which is the path …
popomore 404d58e
chore: add github pull request template
popomore 268073f
chore: use autod to upgrade deps
popomore 71f8681
feat: initializer receive an options for scale
popomore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'ues strict'; | ||
|
||
module.exports = { | ||
write: true, | ||
prefix: '^', | ||
devprefix: '^', | ||
exclude: [ | ||
'test/fixtures', | ||
], | ||
devdep: [ | ||
'autod', | ||
], | ||
keep: [ | ||
], | ||
semver: [ | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- | ||
Thank you for your pull request. Please review below requirements. | ||
Bug fixes and new features should include tests and possibly benchmarks. | ||
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md | ||
|
||
感谢您贡献代码。请确认下列 checklist 的完成情况。 | ||
Bug 修复和新功能必须包含测试,必要时请附上性能测试。 | ||
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md | ||
--> | ||
|
||
##### Checklist | ||
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> | ||
|
||
- [ ] `npm test` passes | ||
- [ ] tests and/or benchmarks are included | ||
- [ ] documentation is changed or added | ||
- [ ] commit message follows commit guidelines | ||
|
||
##### Affected core subsystem(s) | ||
<!-- Provide affected core subsystem(s). --> | ||
|
||
|
||
##### Description of change | ||
<!-- Provide a description of the change below this comment. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
'use strict'; | ||
|
||
module.exports = class TestClass { | ||
constructor() { | ||
constructor(app, fullpath) { | ||
this.user = { | ||
name: 'kai.fangk', | ||
}; | ||
this.app = app; | ||
this.path = fullpath; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
const should = require('should'); | ||
const utils = require('../utils'); | ||
|
||
describe('test/loader/egg_loader.test.js', () => { | ||
|
||
let app; | ||
before(() => { | ||
app = utils.createApp('nothing'); | ||
}); | ||
|
||
it('should container FileLoader and ContextLoader', () => { | ||
should.exists(app.loader.FileLoader); | ||
should.exists(app.loader.ContextLoader); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
第二个参数是不是改为
info { fullpath, ... }
之类的 Object, 预留扩展位好点?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
恩,改成 opt
TZ | 天猪 [email protected]于2016年8月17日 周三上午8:25写道:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fullPath or filePath