generator-angular icon indicating copy to clipboard operation
generator-angular copied to clipboard

Manage global configuration with yeoman storage API

Open marcin-wosinek opened this issue 10 years ago • 1 comments

There are few generator options that rather should remain unchainged during application live:

  1. appPath
  2. coffee
  3. 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.

marcin-wosinek avatar Jan 15 '15 23:01 marcin-wosinek

generator-angular depends on yeoman-generator at ^0.16.0; while storage api was introduced in 0.17

marcin-wosinek avatar Jan 26 '15 22:01 marcin-wosinek