Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
9 changes: 7 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down