0.0.1 • Published 7 years ago
@7stack.io/snippets-helpers v0.0.1
Helpers
This repo contains the helpers that will be available to use in snippets. We'll take pull requests to add additional functionality as long as they're tested and formatted correctly.
Check out https://handlebarsjs.com/block_helpers.html
Adding a Helper
See helpers/dummy for an example helper
- Create a new directory under
./helperswith the name of your helper. When your helper is loaded it will have the name of the directory. - Create
helper.js,helper.test.js, andREADME.mdin your helper directory - Export a function that has the same signature as a handlebars helper in
helper.js - Write at least one
jesttest inhelper.test.jsto test your helper - Add required title, description, and example code in your
README.mdfile
README.md
README.md MUST follow the exact format in the example dummy helper since it will be used to generate docs on the site. Just copy the README and substitute the name, description, and example code. Don't change the header types/etc.
0.0.1
7 years ago