brunch / nunjucks-brunch

Adds nunjucks support to Brunch
8 stars 6 forks source link

Made plugin data available in the global variable scope in the template #1

Closed tenorviol closed 9 years ago

tenorviol commented 9 years ago

It looks like @PxlBuzzard intended arbitrary nunjucks options to be available in the global variable scope of the templates, allowing for rendering stuff like:

Hello {{ username }}

This pull request completes that feature and adds a unit test for it. I also bumped the version to 0.2.1.

PxlBuzzard commented 9 years ago

Thank you, this is a good set of additions and it is cleanly coded.

PxlBuzzard commented 9 years ago

@tenorviol I wanted to thank you for adding the initial unit tests here. Since then I've dug in and gotten the code coverage up to 93% and added Travis to run tests. This project ended up being a great guinea pig for learning more about unit testing and you played a part in that.

tenorviol commented 9 years ago

That's awesome @PxlBuzzard! Yeah, public projects like this do really well with testing. It's a great way to communicate how to use your code. Plus it keeps you from having to manually test your code over and over again. But the best thing is it makes it way easier to refactor as the project progresses. I'm glad you're having a good time with it. Thanks for letting me know!