Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow empty lines and comments within build blocks for Grunt0.4.0

  • Loading branch information...
commit 8558dbc8def836e90ae8d47c85cf740ebe145d98 1 parent c8f28a1
@pajtai authored
Showing with 6 additions and 3 deletions.
  1. +4 −1 README.md
  2. +1 −1  package.json
  3. +1 −1  tasks/useref.js
View
5 README.md
@@ -80,6 +80,8 @@ The example above has three build blocks on the same page. The first two blocks
minifies one file. They all put the new scripts into a newly named file. The original JavaScript files remain untouched
in this case due to the naming of the output files.
+You can put comments and empty lines within build blocks.
+
Assuming your `package.json.version` is `0.1.0` after the bump, and it is October 31, 2012 running `grunt useref` would
create the following three files:
@@ -155,9 +157,10 @@ directory inside the `node_modules` folder of your project.
## Change Log
+* 0.0.16 - Mar 01, 2013 - Allow empty lines and comments within build blocks for Grunt0.4.0
* 0.0.15 - Feb 23, 2013 - Adding grunt 0.4.0 compatibility
* 0.0.11 - Jan 03, 2013 - Making grunt log output a little less obnoxious.
-* 0.0.10 - Jan 02, 2013 - Allow empty lines and comment within build blocks
+* 0.0.10 - Jan 02, 2013 - Allow empty lines and comments within build blocks
* 0.0.9 - Dec 23, 2012 - Setting grunt-css dependency to 0.3.2, since 0.4.1 breaks useref - plan to update when grunt goes to 0.4
* 0.0.7 - Nov 27, 2012 - fixed the css minification task so it does not have to be included in your grunt.js as a dependency
* 0.0.6 - Nov 26, 2012 - updated css minification task and its dependency
View
2  package.json
@@ -2,7 +2,7 @@
"name": "grunt-useref",
"title": "Grunt Useref",
"description": "Use build blocks to update the references in your html and perform file concatenation, minification, and cache busting.",
- "version": "0.0.15",
+ "version": "0.0.16",
"homepage": "https://github.com/pajtai/grunt-useref",
"author": "Peter Ajtai (https://netlumination.com)",
"repository": {
View
2  tasks/useref.js
@@ -149,7 +149,7 @@ module.exports = function (grunt) {
}
}).reduce(function (a, b) {
b = ( b ? b.split(',') : '');
- return a.concat(b);
+ return b ? a.concat(b) : a;
}, []);
grunt.log.writeln("\n");
Please sign in to comment.
Something went wrong with that request. Please try again.