yeoman/grunt-usemin — pull request #139 by shahata (2013-06-25 23:04:11+00:00)
Title: Added uglifyConcat option to let uglify do the concat (important for generating source maps)

Currently it is not possible to work with source maps when using usemin since when we have a block like this:

```html

```

Usemin will generate a config like this:

```javascript
concat: { 'dist/scripts/scripts.js': [ 'scripts/a.js', 'scripts/b.js' ] },
uglify:{ 'dist/scripts/scripts.js': 'dist/scripts/scripts.js' }
```

Which in case I have source maps, will create a source map that points to dist/scripts/scripts.js as the original source, but actually dist/scripts/scripts.js in the minified file...

With uglifyConcat option enabled, usemin will give me the following config:

```javascript
concat: { /* only used for .css, never for .js */ },
uglify:{ 'dist/scripts/scripts.js': [ 'scripts/a.js', 'scripts/b.js ] }
```

Now all I have to do is add something like this to my Gruntfile and I'm good to go:

```javascript
useminPrepare: {html: '...', options: {dest: '...', uglifyConcat: true}},
uglify: {options: {sourceMap: function (name) { return name+'.map'; }}}
```