yeoman/grunt-usemin — pull request #293 by Firfi (2014-02-11 22:42:42+00:00)
Title: Extending config format for user-defined flow steps

Hi,

I use custom step for js handling. Plugin (jsmin-sourcemap) demands configuration in format {dest: [], src: []}. deepMerge function truncate anything except { files: [] } through. I extended it slightly (only for arrays too through). I'd like to see this issue fixed in main repository, so I could reference in packages to it but not to my github repo; if there's additional adjustments that should be done please let me know.

(example how I use it:
```
var jsminUsemin = {
name: 'jsmin-sourcemap',
createConfig: function(context, block) {
var cfg = {dest: [], src: []};
var outfile = block.dest;
cfg.dest = path.join(context.outDir, outfile);
context.inFiles.forEach(function(f) { cfg.src.push(path.join(context.inDir, f)); } );
context.outFiles = [block.dest];
return cfg;
}
};

...

useminPrepare: {
html: 'app/index.html',
options: {
root: 'app',
dest: 'dist/app',
flow: {
html: {
steps: {
js: [jsminUsemin],
css: ['cssmin']
},
post: {}
}

}
}
},
```

Thanks,
Igor