fis-kernel
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -158,2 +158,3 @@ /* | ||
case '.xhtml': | ||
case '.shtml': | ||
case '.htm': | ||
@@ -160,0 +161,0 @@ case '.tpl': //smarty template |
@@ -19,2 +19,5 @@ /* | ||
exclude = fis.config.get('project.exclude'); | ||
if (fis.util.is(exclude, 'Array')){ | ||
project_exclude = exclude.concat([project_exclude]); | ||
} | ||
fis.util.find(root, null, project_exclude).forEach(function(file){ | ||
@@ -21,0 +24,0 @@ file = fis.file(file); |
@@ -470,9 +470,43 @@ /* | ||
_.filter = function(str, include, exclude){ | ||
if(typeof include === 'string'){ | ||
include = _.glob(include); | ||
function normalize(pattern){ | ||
var type = toString.call(pattern); | ||
switch (type){ | ||
case '[object String]': | ||
return _.glob(pattern); | ||
case '[object RegExp]': | ||
return pattern; | ||
default: | ||
fis.log.error('invalid regexp [' + pattern + '].'); | ||
} | ||
} | ||
if(typeof exclude === 'string'){ | ||
exclude = _.glob(exclude); | ||
function match(str, patterns){ | ||
var matched = false; | ||
if (!_.is(patterns, 'Array')){ | ||
patterns = [patterns]; | ||
} | ||
patterns.every(function(pattern){ | ||
if (!pattern){ | ||
return true; | ||
} | ||
matched = matched || str.search(normalize(pattern)) > -1; | ||
return !matched; | ||
}); | ||
return matched; | ||
} | ||
return !((!!include && str.search(include) < 0) || (!!exclude && str.search(exclude) > -1)); | ||
var isInclude, isExclude; | ||
if (include) { | ||
isInclude = match(str, include); | ||
}else{ | ||
isInclude = true; | ||
} | ||
if (exclude) { | ||
isExclude = match(str, exclude); | ||
} | ||
return isInclude && !isExclude; | ||
}; | ||
@@ -479,0 +513,0 @@ |
{ | ||
"name" : "fis-kernel", | ||
"description" : "fis kernel.", | ||
"version" : "2.0.8", | ||
"author" : "FIS Team <fis@baidu.com>", | ||
"homepage" : "http://fis.baidu.com/", | ||
"license": "MIT", | ||
"keywords": [ "fis" ], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fis-dev/fis-kernel.git" | ||
}, | ||
"engines" : { | ||
"node" : ">= 0.8.0" | ||
}, | ||
"main" : "fis-kernel.js", | ||
"scripts" : { | ||
"test" : "mocha test/ut --recursive" | ||
}, | ||
"dependencies" : { | ||
"tar" : "0.1.17", | ||
"iconv-lite" : "0.2.10" | ||
} | ||
"name": "fis-kernel", | ||
"description": "fis kernel.", | ||
"version": "2.0.9", | ||
"author": "FIS Team <fis@baidu.com>", | ||
"homepage": "http://fis.baidu.com/", | ||
"license": "MIT", | ||
"keywords": [ | ||
"fis" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fis-dev/fis-kernel.git" | ||
}, | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
}, | ||
"main": "fis-kernel.js", | ||
"scripts": { | ||
"test": "mocha test/ut" | ||
}, | ||
"dependencies": { | ||
"tar": "0.1.17", | ||
"iconv-lite": "0.2.10" | ||
}, | ||
"devDependencies": { | ||
"chai": "1.9.1", | ||
"fis-optimizer-clean-css": "0.0.12", | ||
"fis-optimizer-uglify-js": "0.1.2", | ||
"fis-packager-map": "0.0.9" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78653
2364
4