grunt-inline
Advanced tools
Comparing version 0.2.9 to 0.3.0
@@ -8,4 +8,4 @@ { | ||
"name": "grunt-inline", | ||
"description": "Inlines <img>, <script> and <link> tags into the same file.", | ||
"version": "0.2.9", | ||
"description": "Inlines img, script and link tags into the same file.", | ||
"version": "0.3.0", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "gruntplugin", |
@@ -117,2 +117,21 @@ # grunt-inline[![build status](https://secure.travis-ci.org/miniflycn/grunt-inline.png)](http://travis-ci.org/miniflycn/grunt-inline) | ||
``` | ||
### exts | ||
Setting an exts array allows multiple file extensions to be processed as | ||
html. | ||
``` | ||
grunt.initConfig({ | ||
inline: { | ||
dist: { | ||
options:{ | ||
uglify: true | ||
}, | ||
src: ['dist/index.html'], | ||
dest: ['dest/'] | ||
} | ||
} | ||
}); | ||
``` | ||
### Usage Examples | ||
@@ -125,4 +144,3 @@ | ||
dist: { | ||
src: [ 'dist/index.html' ], | ||
dest: [ 'dev/' ] | ||
src: [ 'dist/index.jade' ] | ||
} | ||
@@ -198,2 +216,3 @@ } | ||
## Release History | ||
* 2014-05-19 v0.3.0 support for new options.exts | ||
* 2014-05-19 v0.2.9 bug fix: options.tag is assigned '', bug image url in css are not converted to base64 formate | ||
@@ -200,0 +219,0 @@ * 2014-03-06 v0.2.6 bug fix: script tags like <script src="index.js?__inline">\n</script> were not inlined |
@@ -22,3 +22,4 @@ /* | ||
cssmin = !!options.cssmin, | ||
relativeTo = this.options().relativeTo, | ||
relativeTo = this.options().relativeTo, | ||
exts = options.exts, | ||
dest = this.data.dest; | ||
@@ -32,3 +33,3 @@ | ||
if(fileType==='html'){ | ||
if(fileType==='html' || (exts && exts.indexOf(fileType) > -1)){ | ||
fileContent = html(filepath, fileContent, relativeTo, options); | ||
@@ -35,0 +36,0 @@ }else if(fileType==='css'){ |
77239
328
224