Skip to content

Commit

Permalink
allow multiple css files and source files + double quote for src and …
Browse files Browse the repository at this point in the history
…dest.
  • Loading branch information
igor committed Feb 21, 2015
1 parent 6749bce commit c23f26a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tasks/kss.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ module.exports = function (grunt) {
kssCmd.push(realPath + 'node_modules/kss/bin/kss-node');

this.files.forEach(function (file) {
kssCmd.push("'" + file.src[0] + "'");
kssCmd.push("'" + file.dest + "'");
file.src.forEach(function (src) {
kssCmd.push('--source', "\"" + src + "\"");
});

kssCmd.push('--destination', "\"" + file.dest + "\"");
dest = file.dest;
});

Expand All @@ -52,7 +55,14 @@ module.exports = function (grunt) {
kssCmd.push('--custom', opts.custom);
}
if (opts.css !== null) {
kssCmd.push('--css', opts.css);
if(Array.isArray(opts.css)) {
opts.css.forEach(function(css){
kssCmd.push('--css', css);
});
}
else {
kssCmd.push('--css', opts.css);
}
}
if (opts.js !== null) {
kssCmd.push('--js', opts.js);
Expand Down

0 comments on commit c23f26a

Please sign in to comment.