foundation / panini

A super simple flat file generator.
Other
592 stars 104 forks source link

Added support for recursively fetch external data #74

Closed Thumbleweed closed 7 years ago

Thumbleweed commented 8 years ago

When using panini in a medium-sized project, i noticed it was not possible for fetching .json data in nested subfolders. I thought this was weird, since it is possible for partials to be nested in a folder structure.

I changed the selector for fetching data, so it does it recursively. I also changed the unit test for loading external json data, so the json file is in a subfolder.

thomasmattheussen commented 8 years ago

I have also fixed a caching problem with the data files.

When "requiring" files in node, the responses are cached, and thus panini.refresh doesn't actually refresh those files. I fixed this by deleting the require.cache entry for the file you want to load.

gakimball commented 7 years ago

Merged, thanks!