yeoman / generator-backbone

Scaffold out a Backbone.js project
http://yeoman.io
638 stars 157 forks source link

Subtemplates not using requirejs #386

Closed rodfersou closed 8 years ago

rodfersou commented 8 years ago

For some reason includeRequireJS flag is not being set when create package with --requirejs in .yo-rc.json file.

I tried to find where to set it without success, can someone help me with that?

rodfersou commented 8 years ago

When I add this flag in my yo-rc.json file everything went ok:

$ cat .yo-rc.json
{
  "generator-backbone": {
    "appPath": "app",
    "appName": "CollectiveBehaviorFeaturedimage",
    "testFramework": "mocha",
    "templateFramework": "lodash",
    "sassBootstrap": true,
    "includeRequireJS": true,
    "coffee": false
  },
  "generator-mocha": {}
}
rodfersou commented 8 years ago

But the default generator is not respecting the --requirejs flag.

eddiemonge commented 8 years ago

I'm fairly sure this line https://github.com/yeoman/generator-backbone/blob/36d7dc9b59f34638904b18d56fbbea6ae297ac90/generators/app/index.js#L61 should instead be this.options.requirejs