gulp-usemin
Advanced tools
Comparing version 0.3.21 to 0.3.22
@@ -80,3 +80,2 @@ var fs = require('fs'); | ||
var section = sections[i].split(startReg); | ||
blocks.push(section[0]); | ||
@@ -90,3 +89,12 @@ | ||
if (section[1] !== 'remove') { | ||
if (jsReg.test(section[5])) { | ||
if(section[1] === 'htmlimport'){ | ||
blocks.push({ | ||
type: 'htmlimport', | ||
nameInHTML: section[3], | ||
name: path.join(outputPath || path.relative(basePath, mainPath), section[4]), | ||
files: getFiles(section[5], cssReg, section[2]), | ||
tasks: options[section[1]] | ||
}); | ||
}else if (jsReg.test(section[5])) { | ||
if (section[1].indexOf('inline') !== -1) { | ||
@@ -93,0 +101,0 @@ blocks.push({ |
@@ -87,2 +87,9 @@ module.exports = function(file, blocks, options, push, callback) { | ||
} | ||
else if (block.type == 'htmlimport') { | ||
pipeline(block.name, block.files, block.tasks, function(name, file) { | ||
push(file); | ||
html[i] += '<link rel="import" href="' + name.replace(path.basename(name), path.basename(file.path)) + '"/>'; | ||
resolve(); | ||
}.bind(this, block.nameInHTML)); | ||
} | ||
}); | ||
@@ -89,0 +96,0 @@ }); |
{ | ||
"name": "gulp-usemin", | ||
"version": "0.3.21", | ||
"version": "0.3.22", | ||
"description": "Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views).", | ||
@@ -33,3 +33,4 @@ "main": "index.js", | ||
"gulpplugin", | ||
"usemin" | ||
"usemin", | ||
"gulp-usemin" | ||
], | ||
@@ -36,0 +37,0 @@ "author": "Alexander Zonov <zont@pochta.ru>", |
@@ -80,2 +80,7 @@ [![Build Status](https://travis-ci.org/zont/gulp-usemin.svg?branch=master)](https://travis-ci.org/zont/gulp-usemin) | ||
<!-- build:htmlimport components-packed.html --> | ||
<link rel="import" href="components-a.html"> | ||
<link rel="import" href="components-b.html"> | ||
<!-- endbuild --> | ||
<!-- build:js js/lib.js --> | ||
@@ -234,2 +239,5 @@ <script src="../lib/angular-min.js"></script> | ||
#####0.3.22 | ||
- Added html import support (by linfaxin) | ||
#####0.3.21 | ||
@@ -236,0 +244,0 @@ - Added support paths with querystring or hash (by Lanfei) |
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
52028
875
338