yeoman/grunt-bower-requirejs — pull request #28 by robdodson (2013-06-17 05:51:19+00:00)
Title: Rely on data-main unless explicit baseUrl option is set

This PR is a combination of my earlier work #25 and @stephenplusplus's PR #27. It's meant to resolve #18 and a few other issues with path generation.

Per Stephen's PR, the task will run from whichever directory contains the rjsConfig file. If `data-main` is being used then this dir is the implicit [baseUrl.](http://requirejs.org/docs/api.html#config-baseUrl)

Per my earlier PR, if the `baseUrl` option is set then the task will run from that dir. In my previous PR I referred to this option as `cwd` but I think `baseUrl` makes more sense. Example:

``` js
bower: {
options: {
exclude: ['modernizr']
},
all: {
options: {
baseUrl: '<%= yeoman.app %>'
},
rjsConfig: '<%= yeoman.app %>/scripts/main.js'
}
}
```

I think/hope this covers all path generation scenarios. For folks using yeoman and `data-main` things will just work with no configuration needed. For folks like me who don't use `data-main` there's the ability to explicitly set which dir the paths should be made relative to.