cgross / generator-cg-angular

Yeoman generator for Enterprise Angular projects.
MIT License
592 stars 198 forks source link

Configurable 'use strict' on generator JS files #92

Open joeljeske opened 9 years ago

joeljeske commented 9 years ago

It would be nice to allow generating files with the 'use strict' directive within functions. It would be useful to allow a choice during initial setup to generate files with or without the 'use strict' directive.

pusherman commented 9 years ago

You can always just override the templates that are generated to include 'use strict'

joeljeske commented 9 years ago

Yes that's very true. I thought it might be handy to allow an option for this as opposed to having to edit the config file and find the existing templates and adding strict to them. It also prompts the user to think if they want to use strict (which is better practice). It also helps avoiding making the global scope strict which is another common bad practice (especially when the build concatenates all the files together automatically).

Also, making development simpler and fool proof is the main goal of yeoman.

carloscasalar commented 9 years ago

+1