Modifying Yeoman Angular generator to use folder other than app
angularjs, yeoman, yeoman-generator
Solution
For current versions of bower&yo this requires changes in following places:
- .bowerrc: `"directory": "app/bower_components"` → `"directory": "public/angular/bower_components"`
- .gitignore: `app/bower_components` → `public/angular/bower_components`
- bower.json: add property: `"appPath": "public/angular"` (https://github.com/yeoman/generator-angular#output)
- karma.conf.js: all `app` → `public/angular`
If you are starting from scratch, move `app` folder to `public/angular` after `$ yo angular` invocation.
Problem
I have an existing project with a directory structure like public/angular/ . But in angular generator everything goes to app . How can I modify that behaviour and customise it ? .For starters I am just trying to change app folder to public/angular/ I tried first by changing the ``` this.env.options.appPath = 'public/angular'; ``` But this caused erratic behaviour casing some file to go into public/angular and rest into app/ . Currently bower_components and views and others(404.html and favicon.ico) are stuck in app/ rest are in public/angular