Ty3uK / parcel-plugin-pug

Pug template support for Parcel bundler
MIT License
46 stars 6 forks source link

Locals #15

Open argyleink opened 6 years ago

argyleink commented 6 years ago

How do I pass locals? I'd really like to pass in data to keep my jade dry. 🤘

Prinzhorn commented 6 years ago

Same here. I want to migrate a http://harpjs.com/ project to parcel.

Harp has a harp.json for data that is available to all templates and _data.json which maps filenames to data. You can also access data about the file you're in http://harpjs.com/docs/development/contents http://harpjs.com/docs/development/current

I have never used parcel before and I'm not sure if it's even something that fits into its philosophy.

argyleink commented 6 years ago

i'd love it if it looked in a folder called /data, used quaff, and piped it as locals. would still be 0 config..

if you shared quickly how that could be implemented in this plugin, i could fork and try to offer it