generator-angular
generator-angular copied to clipboard
Manage global configuration with yeoman storage API
There are few generator options that rather should remain unchainged during application live:
- appPath
- coffee
- app-suffix
point 3 currently is unsaved and it's address in #975. The points 1 & 2 are working as expected, but in point 2 case it's implemented by searching coffee files in scripts.
50 // attempt to detect if user is using CS or not
51 // if cml arg provided, use that; else look for the existence of cs
52 if (!this.options.coffee &&
53 this.expandFiles(path.join(this.env.options.appPath, '/scripts/**/*.coffee'), {}).length > 0) {
54 this.options.coffee = true;
55 }
@sindresorhus pointed out storage api as different way to implement it. It's look pretty cool, and I'm happy to prepare PR implementing option permanency with it.
generator-angular depends on yeoman-generator at ^0.16.0; while storage api was introduced in 0.17