diff --git a/app/index.js b/app/index.js index 57045e4b5..6cae41e41 100644 --- a/app/index.js +++ b/app/index.js @@ -104,6 +104,25 @@ var Generator = module.exports = function Generator(args, options) { util.inherits(Generator, yeoman.generators.Base); +Generator.prototype.welcome = function welcome() { + // welcome message + if (!this.options['skip-welcome-message']) { + console.log(this.yeoman); + console.log( + 'Out of the box I include Bootstrap and some AngularJS recommended modules.\n' + ); + + // Deprecation notice for minsafe + if (this.options.minsafe) { + console.warn( + '\n** The --minsafe flag is being deprecated in 0.7.0 and removed in ' + + '0.8.0. For more information, see ' + + 'https://github.com/yeoman/generator-angular#minification-safe. **\n' + ); + } + } +}; + Generator.prototype.askForBootstrap = function askForBootstrap() { var cb = this.async(); diff --git a/readme.md b/readme.md index 7a9732b02..ea92f03ec 100644 --- a/readme.md +++ b/readme.md @@ -191,10 +191,15 @@ angular.module('myMod') A project can mix CoffeScript and JavaScript files. -To output JavaScript files, even if CoffeeScript files exist (the default is to output CoffeeScript files if -the generator finds any in the project), use `--coffee=false`. +To output JavaScript files, even if CoffeeScript files exist (the default is to output CoffeeScript files if the generator finds any in the project), use `--coffee=false`. ### Minification Safe + +**Deprecated** + +[Related Issue #452](https://github.com/yeoman/generator-angular/issues/452): This option is being removed in future versions of the generator. Initially it was needed as ngMin was not entirely stable. As it has matured, the need to keep separate versions of the script templates has led to extra complexity and maintenance of the generator. By removing these extra burdens, new features and bug fixes should be easier to implement. If you are dependent on this option, please take a look at ngMin and seriously consider implementing it in your own code. It will help reduce the amount of typing you have to do (and look through) as well as make your code cleaner to look at. + + By default, generators produce unannotated code. Without annotations, AngularJS's DI system will break when minified. Typically, these annotations that make minification safe are added automatically at build-time, after application files are concatenated, but before they are minified. By providing the `--minsafe` option, the code generated will out-of-the-box be ready for minification. The trade-off is between amount of boilerplate, and build process complexity. #### Example