Comparing version 0.2.26 to 0.2.27
22
index.js
@@ -5,4 +5,4 @@ | ||
/** | ||
* @version 0.2.26 | ||
* @date 2015-03-12 | ||
* @version 0.2.27 | ||
* @date 2015-03-13 | ||
* @license MIT License | ||
@@ -195,6 +195,8 @@ */ | ||
if (exclude.indexOf(file) == -1) { | ||
var dataIf = /\sdata-if="([^"]+)"/.exec(_) | ||
file = replace[file] || file | ||
if (inlineRe.test(_) || inline.indexOf(file) != -1) { | ||
var bs = readFile(root + file) | ||
return "\f<script>" + bs.trim() + "</script>" | ||
var bs = readFile(root + file).trim() | ||
if (dataIf) bs = "if(" + dataIf[1] + "){" + bs + "}" | ||
return "\f<script>" + bs + "</script>" | ||
} | ||
@@ -214,2 +216,4 @@ if (match = /\ssquash(?:="([^"]+)"|\b)/i.exec(_)) { | ||
var arr = /\bdefer\b/i.test(_) ? deferScripts : scripts | ||
file = '"' + normalizePath(file, root) + '"' | ||
if (dataIf) file = "(" + dataIf[1] + ")&&" + file | ||
if (arr.indexOf(file) == -1) arr.push(file) | ||
@@ -243,6 +247,2 @@ } | ||
function updateFiles(val, key, arr) { | ||
arr[key] = normalizePath(val, root) | ||
} | ||
function writeOutput() { | ||
@@ -264,8 +264,6 @@ output = output | ||
if (!args.bootstrap) return "" | ||
scripts.forEach(updateFiles) | ||
deferScripts.forEach(updateFiles) | ||
var bs = readFile(args.bootstrap) | ||
.replace("this,[]", "this," + JSON.stringify(scripts) + | ||
(deferScripts.length ? ", function(){xhr.load(" + JSON.stringify(deferScripts) + ")}" : "") ) | ||
.replace("this,[]", "this,[" + scripts + "]" + | ||
(deferScripts.length ? ", function(){xhr.load([" + deferScripts + "])}" : "") ) | ||
@@ -272,0 +270,0 @@ return "<script>\n" + bs + "</script>" |
{ | ||
"name": "buildman", | ||
"version": "0.2.26", | ||
"version": "0.2.27", | ||
"stability": 1, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@version 0.2.26 | ||
@date 2015-03-12 | ||
@version 0.2.27 | ||
@date 2015-03-13 | ||
@stability 1 - Experimental | ||
@@ -5,0 +5,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
24942
643