6.1.0 • Published 5 months ago
@pattern-lab/engine-handlebars v6.1.0
The Handlebars PatternEngine for Pattern Lab / Node
To install the Handlebars PatternEngine in your edition, npm install --save @pattern-lab/engine-handlebars
should do the trick.
Supported features
- Includes
- Lineage
- Hidden Patterns
- Pseudo-Patterns
- Pattern States
Pattern Parameters(Accomplished instead using native Handlebars partial arguments)Style Modifiers(Accomplished instead using native Handlebars partial arguments)
Helpers
To add custom helpers or otherwise interact with Handlebars directly, create a file named patternlab-handlebars-config.js
in the root of your Pattern Lab project, or override the default location by specifying one or several glob patterns in the Pattern Lab config:
{
...
"engines": {
"handlebars": {
"extend": [
"handlebars-helpers.js",
"helpers/**/*.js"
]
}
}
}
Each file should export a function which takes Handlebars as an argument.
module.exports = function(Handlebars) {
// Put helpers here
Handlebars.registerHelper('fullName', function(person) {
// Example: person = {firstName: "Alan", lastName: "Johnson"}
return person.firstName + " " + person.lastName;
});
};
6.1.0
5 months ago
6.0.0
1 year ago
5.16.4
2 years ago
5.16.1
2 years ago
5.15.1
3 years ago
5.14.3
3 years ago
5.14.0
3 years ago
5.10.1
4 years ago
5.10.0
4 years ago
5.5.0
4 years ago
5.0.0
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
2.0.0-beta.1
5 years ago
2.0.0-beta.0
6 years ago
2.0.0-alpha.8
6 years ago
2.0.0-alpha.7
6 years ago
2.0.0-alpha.6
6 years ago
2.0.0-alpha.5
6 years ago
2.0.0-alpha.4
6 years ago
2.0.0-alpha.3
6 years ago