lib/css/sprite.js
function (srcPath, options) {
        _.defaults(options || (options = {}), DEFAULT_OPTIONS);
        if(!this.isSpriteImage(srcPath, options)) {
            logger.error('is not SpriteImage. srcPath:' + srcPath);
            return [];
        }

        var separator = options.separator;
        var ratios = options.ratios;
        var group = this.getGroup(srcPath, options);
        var head = this.getHead(srcPath, options);
        var files = [];
        files.push(head + separator + group + '.styl');
        for (var i = 0; i < ratios.length; i++) {
            files.push('sprite' + separator + group + '@' + (ratios[i] * 10) + 'x.png');
        }

        return files;
    }
function (srcPath, options) {
        _.defaults(options || (options = {}), DEFAULT_OPTIONS);
        if(!this.isSpriteImage(srcPath, options)) {
            logger.error('is not SpriteImage. srcPath:' + srcPath);
            return [];
        }

        var separator = options.separator;
        var ratios = options.ratios;
        var group = this.getGroup(srcPath, options);
        var head = this.getHead(srcPath, options);
        var files = [];
        files.push(head + separator + group + '.styl');
        for (var i = 0; i < ratios.length; i++) {
            files.push('sprite' + separator + group + '@' + (ratios[i] * 10) + 'x.png');
        }

        return files;
    }
function ( srcPath , options ) { _ . defaults ( options || ( options = { } ) , DEFAULT_OPTIONS ) ; if ( ! this . isSpriteImage ( srcPath , options ) ) { logger . error ( 'is not SpriteImage. srcPath:' + srcPath ) ; return [ ] ; } var separator = options . separator ; var ratios = options . ratios ; var group = this . getGroup ( srcPath , options ) ; var head = this . getHead ( srcPath , options ) ; var files = [ ] ; files . push ( head + separator + group + '.styl' ) ; for ( var i = 0 ; i < ratios . length ; i ++ ) { files . push ( 'sprite' + separator + group + '@' + ( ratios [ i ] * 10 ) + 'x.png' ) ; } return files ; }
After building, then to get the files that are created
@param {String} srcPath
@param {Object} options
@returns {Array}
var srcPath = 'test/image/sprite/sprite-logo-hoge.png'
var options = {
separator: '-',
ratios: [ 1, 2 ]
};
var out = getCreateFile(srcPath, options):
console.log(out);
> [ 'sprite-logo.styl', 'sprite-logo@10x.png', 'sprite-logo@20x.png' ]
After building then to get the files that are created