tasks/kss.js
function buildKssCmd(node, kssNpmPath, options, files) {

            var cmd = [
                    node,
                    kssNpmPath
                ],
                options;
            for (var optionName in options) {

                if (options.hasOwnProperty(optionName)) {
                    grunt.log.debug('Reading option: ' + optionName);

                    var values = options[optionName];
                    if (!Array.isArray(values)) {
                        values = [values];
                    }
                    for (var i = 0; i < values.length; i++) {
                        if (values[i] && typeof values[i] === 'boolean') {
                            grunt.log.debug('                > TRUE');
                            cmd.push('--' + optionName);
                        } else if (typeof values[i] === 'string') {
                            cmd.push('--' + optionName, values[i]);
                            grunt.log.debug('                > ' + values[i]);
                        }
                    }
                }
            }
            files.forEach(function parseDestinationsFile(file) {

                if (file.src.length === 0) {
                    grunt.log.error('No source files found');
                    grunt.fail.warn('Wrong configuration', 1);
                }
                cmd.push('--destination', '"' + file.dest + '"');
                for (var i = 0; i < file.src.length; i++) {
                    cmd.push('--source', '"' + file.src[i] + '"');
                }

                dest = file.dest;
            });
            return cmd;
        }
function buildKssCmd(node, kssNpmPath, options, files) {

            var cmd = [
                    node,
                    kssNpmPath
                ],
                options;
            for (var optionName in options) {

                if (options.hasOwnProperty(optionName)) {
                    grunt.log.debug('Reading option: ' + optionName);

                    var values = options[optionName];
                    if (!Array.isArray(values)) {
                        values = [values];
                    }
                    for (var i = 0; i < values.length; i++) {
                        if (values[i] && typeof values[i] === 'boolean') {
                            grunt.log.debug('                > TRUE');
                            cmd.push('--' + optionName);
                        } else if (typeof values[i] === 'string') {
                            cmd.push('--' + optionName, values[i]);
                            grunt.log.debug('                > ' + values[i]);
                        }
                    }
                }
            }
            files.forEach(function parseDestinationsFile(file) {

                if (file.src.length === 0) {
                    grunt.log.error('No source files found');
                    grunt.fail.warn('Wrong configuration', 1);
                }
                cmd.push('--destination', '"' + file.dest + '"');
                for (var i = 0; i < file.src.length; i++) {
                    cmd.push('--source', '"' + file.src[i] + '"');
                }

                dest = file.dest;
            });
            return cmd;
        }
function buildKssCmd ( node , kssNpmPath , options , files ) { var cmd = [ node , kssNpmPath ] , options ; for ( var optionName in options ) { if ( options . hasOwnProperty ( optionName ) ) { grunt . log . debug ( 'Reading option: ' + optionName ) ; var values = options [ optionName ] ; if ( ! Array . isArray ( values ) ) { values = [ values ] ; } for ( var i = 0 ; i < values . length ; i ++ ) { if ( values [ i ] && typeof values [ i ] === 'boolean' ) { grunt . log . debug ( '                > TRUE' ) ; cmd . push ( '--' + optionName ) ; } else if ( typeof values [ i ] === 'string' ) { cmd . push ( '--' + optionName , values [ i ] ) ; grunt . log . debug ( '                > ' + values [ i ] ) ; } } } } files . forEach ( function parseDestinationsFile ( file ) { if ( file . src . length === 0 ) { grunt . log . error ( 'No source files found' ) ; grunt . fail . warn ( 'Wrong configuration' , 1 ) ; } cmd . push ( '--destination' , '"' + file . dest + '"' ) ; for ( var i = 0 ; i < file . src . length ; i ++ ) { cmd . push ( '--source' , '"' + file . src [ i ] + '"' ) ; } dest = file . dest ; } ) ; return cmd ; }
build kss command

@private
@param {string} node path to nodejs bin
@param {string} kssNpmPath path to kss bin
@param {array} options kss options
@param {array} files file list grunt.task.current.files
@returns {array}
build kss command