flex-combo
Advanced tools
Comparing version 0.12.3 to 0.12.4
@@ -54,6 +54,2 @@ var urlLib = require("url"); | ||
if (confJSON.filter || param.filter) { | ||
this.param.filter = merge(confJSON.filter || {}, param.filter || {}); | ||
} | ||
var rootdir = this.param.rootdir || "src"; | ||
@@ -60,0 +56,0 @@ if (rootdir.indexOf('/') == 0 || /^\w{1}:[\\/].*$/.test(rootdir)) { |
@@ -23,11 +23,16 @@ var fsLib = require("fs"); | ||
/* 获取应用filter规则后的url */ | ||
exports.filteredUrl = function (_url, filter, traceRule) { | ||
filter = filter || {}; | ||
var regx; | ||
var ori_url; | ||
for (var fk in filter) { | ||
regx = new RegExp(fk); | ||
exports.filteredUrl = function (_url, _filter, traceRule) { | ||
_filter = _filter || {}; | ||
var jsonstr = JSON.stringify(_filter).replace(/\\{2}/g, '\\'); | ||
var filter = []; | ||
jsonstr.replace(/[\{\,]"([^"]*?)"/g, function (all, key) { | ||
filter.push(key); | ||
}); | ||
var regx, ori_url; | ||
for (var k = 0, len = filter.length; k < len; k++) { | ||
regx = new RegExp(filter[k]); | ||
if (regx.test(_url)) { | ||
ori_url = _url; | ||
_url = _url.replace(regx, filter[fk]); | ||
_url = _url.replace(regx, _filter[filter[k]]); | ||
if (traceRule && traceRule.test("Filter " + ori_url + _url)) { | ||
@@ -53,3 +58,2 @@ utilLib.logue("%s %s " + ori_url + " => %s", "[Filter]", regx, _url); | ||
longestMatchNum = k.length; | ||
repPath = map[k]; | ||
@@ -120,3 +124,3 @@ revPath = _url.slice(longestMatchNum); | ||
return { | ||
color: function(color, str) { | ||
color: function (color, str) { | ||
console.log(colorFull(color, str)); | ||
@@ -123,0 +127,0 @@ }, |
{ | ||
"name": "flex-combo", | ||
"version": "0.12.3", | ||
"version": "0.12.4", | ||
"description": "A combo tool designed for web front-end developer, which support various kinds of combo format by modify configuration(eg. yahoo combo).", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"commander": "~2.5.0", | ||
"dac": "~0.5.2", | ||
"dac": "~0.5.4", | ||
"fetch-agent": "~0.2.3", | ||
@@ -16,0 +16,0 @@ "inline-source-map-comment": "~1.0.5", |
@@ -99,4 +99,11 @@ # Flex Combo 介绍 | ||
在URL的query中添加`sourcemap`以启用SourceMap功能 | ||
在URL的query中添加`sourcemap`参数以启用SourceMap功能 | ||
``` | ||
eg. | ||
http://xxx.com/a.js?t=20150101&sourcemap | ||
http://xxx.com/??b.js,c.js?sourcemap | ||
``` | ||
## 命令参数 | ||
@@ -103,0 +110,0 @@ |
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
82251
753
305
Updateddac@~0.5.4