yeoman / generator-webapp

A gulp.js generator for modern webapps
3.77k stars 708 forks source link

Working with JSON-files in jade-templates #541

Closed mortensassi closed 8 years ago

mortensassi commented 8 years ago

Thank you for your jade-receip, it really helped me! For my navigation.jade i want to create a JSON-file so i can keep everything maintainable

ul.nav -- li.navitem ---- a.navlink ------ svg.navicon ------ span.navtitle

How can I pass the this JSON to my jade-template?

neilhem commented 8 years ago

You can use https://www.npmjs.com/package/gulp-data to get data from json file

silvenon commented 8 years ago

Actually, it would be a bit silly for us to add gulp-data to every template recipe, and implementation of gulp-data is very arbitrary, so we will trust our users to figure it out on their own, or alternatively stumble upon this issue. 😄