https://github.com/cloudfour/core-hbs-helpers
Handlebars helpers that we usually need
https://github.com/cloudfour/core-hbs-helpers
Last synced: 12 months ago
JSON representation
Handlebars helpers that we usually need
- Host: GitHub
- URL: https://github.com/cloudfour/core-hbs-helpers
- Owner: cloudfour
- License: mit
- Created: 2015-10-20T18:29:07.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T00:14:08.000Z (about 2 years ago)
- Last Synced: 2024-03-15T03:09:41.874Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 175 KB
- Stars: 11
- Watchers: 6
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Core Handlebars Helpers
[](https://www.npmjs.com/package/@cloudfour/hbs-helpers) [](https://doxdox.org/cloudfour/core-hbs-helpers/) [](https://renovatebot.com)
## Usage
```
npm install --save-dev @cloudfour/hbs-helpers
```
### Using vanilla Handlebars
```js
var helpers = require('@cloudfour/hbs-helpers');
var Handlebars = require('handlebars');
Object.keys(helpers).forEach(function (key) {
Handlebars.registerHelper(key, helpers[key]);
});
```
### Using `gulp-compile-handlebars`
```js
var gulp = require('gulp');
var handlebars = require('gulp-compile-handlebars');
var helpers = require('@cloudfour/hbs-helpers');
gulp.task('default', function () {
return gulp.src('*.hbs')
.pipe(handlebars({
helpers: helpers
}))
.pipe(gulp.dest('./dist'));
});
```
## Documentation
See our [doxdox site](https://doxdox.org/cloudfour/core-hbs-helpers/) for complete documentation of each helper.