.vscode | ||
test | ||
ts | ||
.gitignore | ||
.gitlab-ci.yml | ||
.npmignore | ||
npmextra.json | ||
package.json | ||
pnpm-lock.yaml | ||
readme.md | ||
tsconfig.json |
@pushrocks/smarthbs
handlebars with better fs support
Availabililty and Links
Status for master
Usage
Note: Why did we decide against a class based architecture?
Easy: handlebars.js is already pretty determined how things are handled internally, namely a global partial template registry It doesn't make sense to then introduce a scoped partial template approach.
import * as smarthbs from 'smarthbs';
// read all .hbs files in a directory and any child directories and use relative path as partial string identifier
smarthbs.registerPartialDir(testPartialDir);
// read all .hbs files in a particular directory and level, output them to a destination and specify a .json file to read any referenced data
smarthbs.compileDirectory(testHbsDir, testResultDir, 'data.json');
Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can contribute one time or contribute monthly. :)
For further information read the linked docs at the top of this readme.
MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy