yeoman/grunt-usemin — pull request #230 by corbanbrook (2013-11-12 03:36:13+00:00)
Title: feature: Optional configuration target

In usemin 2.0.0 the configurations targets for all blocks are set to the 'generated' namespace. This makes it difficult to target individual blocks especially when using multiple of one type. Our current project is quite large and I like to keep my main source libs and vendor libs separated and use different uglify options on each js block, 1) to speed up build by not compressing/mangling concatenated vendor libs which come pre minified and 2) specifying preserveComments as many libs like JQuery include License comment banners which are required by copyright law (I know most people just strip these out anyways).

The included patch allows for including an optional configuration target in the html block like so:

```html

<-- endbuild -->
```

Now i rather than everything under the 'generated' target i have 'thirdparty' and 'application' and now I can easily specify custom uglify options for my vendor libs.

```coffeescript
uglify:
thirdparty:
options:
compress: false
mangle: false
preserveComments: 'all'

If you do not specify a target it will use the default 'generated'.

In the future it would be nice to take this a step further and allow for custom flows per target per type as well.

I welcome any feedback.