gulp-usemin
Advanced tools
Comparing version 0.3.0 to 0.3.1
25
index.js
@@ -63,23 +63,12 @@ var path = require('path'); | ||
function processTask(index, tasks, name, files, callback) { | ||
var newFiles = []; | ||
if (tasks[index] == 'concat') { | ||
var newFile = concat(files, name); | ||
if (tasks[++index]) | ||
processTask(index, tasks, name, [newFile], callback); | ||
else | ||
callback(newFile); | ||
newFiles = [concat(files, name)]; | ||
} | ||
else { | ||
var stream = tasks[index]; | ||
var count = files.length; | ||
var newFiles = []; | ||
function write(file) { | ||
newFiles.push(file); | ||
if (--count <= 0) { | ||
if (tasks[++index]) | ||
processTask(index, tasks, name, newFiles, callback); | ||
else | ||
callback(newFiles[0]); | ||
} | ||
} | ||
@@ -93,2 +82,7 @@ | ||
} | ||
if (tasks[++index]) | ||
processTask(index, tasks, name, newFiles, callback); | ||
else | ||
newFiles.forEach(callback); | ||
} | ||
@@ -118,3 +112,4 @@ | ||
push(file); | ||
html.push('<script src="' + name.replace(path.basename(name), path.basename(file.path)) + '"></script>'); | ||
if (path.extname(file.path) == '.js') | ||
html.push('<script src="' + name.replace(path.basename(name), path.basename(file.path)) + '"></script>'); | ||
}.bind(this, section[3])); | ||
@@ -121,0 +116,0 @@ else |
{ | ||
"name": "gulp-usemin", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -154,2 +154,5 @@ # gulp-usemin | ||
#####0.3.1 | ||
- fixed fails to create source map files by uglify({outSourceMap: true}) | ||
#####0.3.0 | ||
@@ -156,0 +159,0 @@ - new version of options |
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
192
27775
607