Comparing version 0.2.15 to 0.2.16
20
index.js
@@ -5,3 +5,3 @@ | ||
/* | ||
* @version 0.2.15 | ||
* @version 0.2.16 | ||
* @date 2014-10-07 | ||
@@ -55,3 +55,2 @@ * @license MIT License | ||
function Nop(){} | ||
@@ -81,3 +80,3 @@ function minJs(args, next) { | ||
if (args.toggle) fileString = fileString.replace(new RegExp("\\/\\/\\*\\* (?="+args.toggle + ")", "g"), "/*** ") | ||
if (args.toggle) fileString = fileString.replace(new RegExp("\\/\\/(?=\\*\\*\\s+"+args.toggle + ")", "g"), "/*") | ||
@@ -231,6 +230,3 @@ if (args.devel) { | ||
if (inlineRe.test(_) || inline.indexOf(file) != -1) { | ||
//console.log("# read file " + root + file) | ||
var bs = readFile(root + file) | ||
//console.log("# got " + bs) | ||
return "<style>" + bs.trim() + "</style>" | ||
return "<style>" + readFile(root + file).trim() + "</style>" | ||
} | ||
@@ -264,5 +260,3 @@ return _ | ||
function normalizePath(p) { | ||
//return path.normalize(p) | ||
//for (;p != (p = p.replace(/[^/]*[^.]\/\.\.\/|\.\/|\/(?=\/)/, ""));); | ||
for (;p != (p = p.replace(/[^/]*[^.]\/\.\.\/|\.\//, ""));); | ||
for (;p != (p = p.replace(/[^/]*[^.]\/\.\.\/|\.\/|\/(?=\/)/, ""));); | ||
return p | ||
@@ -273,5 +267,5 @@ } | ||
if (path) | ||
str = str.replace(/url\(['"]?/g, "$&"+path) | ||
str = str.replace(/url\(['"]?(?!data:)/g, "$&"+path) | ||
return str.replace(/@import\s+url\((['"]?)(.+?)\1\);*/g, function(_, quote, fileName) { | ||
return str.replace(/@import\s+url\((['"]?)(?!data:)(.+?)\1\);*/g, function(_, quote, fileName) { | ||
var file = readFile(root + fileName) | ||
@@ -340,3 +334,3 @@ | ||
.replace(/:0 0( 0 0)?(;|})/g, ":0$2") | ||
.replace(/url\("(.+?)"/g, function(_, file) { | ||
.replace(/url\("(?!data:)(.+?)"/g, function(_, file) { | ||
return 'url("' + normalizePath(file) + '"' | ||
@@ -343,0 +337,0 @@ }) |
{ | ||
"name": "buildman", | ||
"version": "0.2.15", | ||
"version": "0.2.16", | ||
"stability": 1, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@version 0.2.15 | ||
@version 0.2.16 | ||
@date 2014-10-07 | ||
@@ -4,0 +4,0 @@ @stability 1 - Experimental |
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
16
58796
46
1168