gruntjs/grunt-contrib-jst — pull request #20 by colinhicks (2013-02-21 15:51:20+00:00)
Title: Configure path to underscore in AMD wrapper (option 1 of 2)

Addresses #18. See discussion there for context.

Since compiled templates include a reference to `_`, that dependency needs to be explicitly defined when the AMD wrapper is used.

With this pull, given `amdWrapper: true`, the first line of jst output is:
```javascript
define(['underscore'], function(_) {
```

The default path to the underscore dependency can be overriden in the Gruntfile (see option 2 for alternate syntax):
```javascript
// Gruntfile.js
jst: {
compile {
options: {
amdWrapper: true,
amdPathToUnderscore: 'path/to/lodash'
},
files: {
"build/templates.js": ["templates/**/*.html"]
}
}
}

// build/templates.js
define(['path/to/lodash'], function(_) {
```

*Note: You may also choose to specify this path in your RequireJS config.*