-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bug: goofychris/express-art-template#1
- Loading branch information
Showing
6 changed files
with
98 additions
and
35 deletions.
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
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,4 +1,4 @@ | ||
/*! [email protected].2 | https://github.com/aui/art-template */ | ||
/*! [email protected].3 | https://github.com/aui/art-template */ | ||
module.exports = | ||
/******/ (function(modules) { // webpackBootstrap | ||
/******/ // The module cache | ||
|
@@ -235,6 +235,31 @@ var nativeRule = __webpack_require__(13); | |
var htmlMinifier = __webpack_require__(7); | ||
var resolveFilename = __webpack_require__(11); | ||
|
||
var toString = Object.prototype.toString; | ||
var isObject = function isObject(value) { | ||
return value !== null && toString.call(value).slice(8, -1) === 'Object'; | ||
}; | ||
|
||
/** | ||
* 继承默认配置 | ||
* @param {Object} options | ||
* @return {Object} | ||
*/ | ||
function extend(options) { | ||
var copy = Object.create(this); | ||
|
||
for (var name in options) { | ||
var value = options[name]; | ||
if (isObject(value)) { | ||
copy[name] = extend.call(copy[name], value); | ||
} else { | ||
copy[name] = value; | ||
} | ||
} | ||
|
||
return copy; | ||
}; | ||
|
||
/** 模板编译器默认配置 */ | ||
var defaults = { | ||
|
||
|
@@ -296,21 +321,7 @@ var defaults = { | |
|
||
}; | ||
|
||
/** | ||
* 继承默认配置 | ||
* @param {Object} options | ||
* @return {Object} | ||
*/ | ||
defaults.$extend = function (options) { | ||
var copy = Object.create(this); | ||
|
||
for (var name in options) { | ||
copy[name] = options[name]; | ||
} | ||
|
||
return copy; | ||
}; | ||
|
||
defaults.$extend = extend; | ||
module.exports = defaults; | ||
|
||
/***/ }), | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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