zurb / front-router

Generate AngularJS states from Front Matter in state templates. Used by Foundation for Apps.
MIT License
8 stars 3 forks source link

configs to options #3

Open wojohowitz opened 8 years ago

wojohowitz commented 8 years ago

Greetings! I was wondering if you guys would consider having the configs passed in through options. I don't do HTML. I rather have front matter get extracted out of my jade (or whatever) and pass into the router. I suppose I could simply just write the foundationRoutes var myself with the extracted properties and just bypass the front-router. Just a thought.

gakimball commented 8 years ago

Could you explain a little more about your build process, and how you would need to use Front Router differently?

wojohowitz commented 8 years ago

I transpile jade to HTML. Naturally, jade would choke on the front matter. What I ended up doing (cheesing it) is use gulp-front-matter to extract and remove it from the jade file, gulp-jade to transpile to html, and then gulp-tap to slap it back in the html and on to front-router. :) cheezy, but easy. Figure if front-router would allow the options directly on config I would have bypassed gulp-tap and just have front-matter put in the configs option.