gruntjs/grunt-contrib-uglify — pull request #53 by rjkip (2013-04-21 10:57:04+00:00)
Title: sourceMapIn generator

One can now pass a function for the `sourceMapIn` option. The function is passed the source filename. It only makes sense when there's one source file, so the user is warned when no or multiple source files will be passed to Uglify, causing the Grunt task to fail.

Use case:
```js
sourcemapin_generator_single_src: {
files: [{
expand: true,
flatten: true,
src: ['test/fixtures/expected/multiple_sourcemaps*.js'],
dest: 'tmp',
ext: '.min.js'
}],
options: {
sourceMap: function (dest) { return dest.replace(/\.js$/, "") + ".map"; },
sourceMapIn: function (src) { return src.replace(/\.js$/, "") + ".map"; }
}
}
```

I've used some generated files from the `expected` directory for my test. Give me a shout when that's not OK. Also, I don't know of a way to test for the Grunt warning, so the test currently fails.