angularjs - How to pass yeoman prompt options through to templated files? -


i'm writing version of generator-angular options support sources in livescript, , bootstrap less, font-awesome etc. work in progress @ https://github.com/gmp26/generator-angular-ls

i'm hung on trivial wish. i'd initial 'halo 'halo installed list reflect options installed in response yeoman questions rather constant common denominator list.

as first attempt - tried lodash templates in templates/*/spec/controller.(ls|js|coffee) adjust $scope.awesomethings list defined in files. fails because optional flags defined prompt (this.bootstrap, this.lessbootstrap, this.fontawesome) in similar manner generator-angular's this.bootstrap , this.compassbootstrap not available in 'this' context template called. both 'this' contexts generators believe prompting 'this' context generator angular:app whereas template called in angular:controller.

so, ideas how communicate flag app/index.js prompting phase through templating phase?

i feel there should way not involve writing , reading files in generated app folder.

maybe hookfor calls for?

yes - appears options can passed other generators through hookfor calls exist in generator-angular. see solution in commit


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -