Skip to content

Commit

Permalink
feat: [BREAKING_CHANGE] remove compatible support loadExtend (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and popomore committed Aug 18, 2016
1 parent 399b326 commit 7d6fe96
Show file tree
Hide file tree
Showing 20 changed files with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/loader/mixin/extend.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const fs = require('fs');
const path = require('path');
const interopRequire = require('interop-require');
const debug = require('debug')('egg-core:extend');
Expand Down Expand Up @@ -73,14 +72,7 @@ module.exports = {
*/
loadExtend(name, proto) {
// 获取需要加载的文件
const filepaths = this.getLoadUnits()
.map(unit => {
let pluginExtendsPath = path.join(unit.path, 'app/extend');
if (!fs.existsSync(pluginExtendsPath)) {
pluginExtendsPath = path.join(unit.path, 'app');
}
return path.join(pluginExtendsPath, name);
});
const filepaths = this.getLoadUnits().map(unit => path.join(unit.path, 'app/extend', name));
const mergeRecord = new Map();
for (const filepath of filepaths) {
if (!utils.existsModule(filepath)) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7d6fe96

Please sign in to comment.