Skip to content

Commit c23f26a

Browse files
author
igor
committed
allow multiple css files and source files + double quote for src and dest.
1 parent 6749bce commit c23f26a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Diff for: tasks/kss.js

+13-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ module.exports = function (grunt) {
3434
kssCmd.push(realPath + 'node_modules/kss/bin/kss-node');
3535

3636
this.files.forEach(function (file) {
37-
kssCmd.push("'" + file.src[0] + "'");
38-
kssCmd.push("'" + file.dest + "'");
37+
file.src.forEach(function (src) {
38+
kssCmd.push('--source', "\"" + src + "\"");
39+
});
40+
41+
kssCmd.push('--destination', "\"" + file.dest + "\"");
3942
dest = file.dest;
4043
});
4144

@@ -52,7 +55,14 @@ module.exports = function (grunt) {
5255
kssCmd.push('--custom', opts.custom);
5356
}
5457
if (opts.css !== null) {
55-
kssCmd.push('--css', opts.css);
58+
if(Array.isArray(opts.css)) {
59+
opts.css.forEach(function(css){
60+
kssCmd.push('--css', css);
61+
});
62+
}
63+
else {
64+
kssCmd.push('--css', opts.css);
65+
}
5666
}
5767
if (opts.js !== null) {
5868
kssCmd.push('--js', opts.js);

0 commit comments

Comments
 (0)