gruntjs/grunt-contrib-jst — pull request #21 by colinhicks (2013-02-21 15:52:16+00:00)
Title: Configure path to underscore in AMD wrapper (option 2 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 1 for alternate syntax):
```javascript
// Gruntfile.js
jst: {
compile {
options: {
amdWrapper: {
pathToUnderscore: '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.*