Comments (6)
If you do not need the files located in https://github.com/n8design/htwoo/tree/main/htwoo-core/helpers loaded by handlebars, this is also not required and you can just use
"engines": {
"handlebars": {
"package": "@pattern-lab/engine-handlebars",
}
}
from patternlab-node.
I'm afraid none of the above is correct.
I wonder that there is an error message popping up because we do absolutely nothing with the given settings at the moment.
For most engines we, we only use extent
, noting more.
I think the initial intention of the creator of that code was to allow the user to override the default fileExtensions
.
I will prepare a fix for the engines and also for the documentation.
Thank you very much for highlighting this discrepancy.
from patternlab-node.
Have you updated the package @pattern-lab/engine-handlebars
in the first project where you tried?
Would you mind reproducing it and hand me the error message you receive?
I tried it for myself with different options and none were giving me an error.
from patternlab-node.
Where I started:
I also had only extend
in configuration:
"engines": {
"handlebars": {
"extend": "helpers/*.js"
}
}
Which I then update to:
"dependencies": {
"@pattern-lab/cli": "^6.0.1",
"@pattern-lab/core": "^6.0.1",
"@pattern-lab/engine-handlebars": "^6.0.0",
"@pattern-lab/uikit-bare": "^0.0.1",
"@pattern-lab/uikit-workshop": "^6.0.1"
}
After npm install and run pattern labs got the following message still with the extend
in there:
I headed over to the documentation, pasted the prescribed change, and got the same message. That's how I provisioned a new project and figured out the misleading configuration there.
If you like reproducing it, you can use hTWOo.
- Clone the repo
- navigate to htwoo-core folder in there and try it for yourself
Thanks in advance.
from patternlab-node.
The only required parameter is the following and it is the source of the issue.
"package": "@pattern-lab/engine-handlebars",
The extend
property will be used by the handlebars engine if you have extensions installed.
from patternlab-node.
Am I correct? The only thing needed is:
"engines": {
"handlebars": {
"package": "@pattern-lab/engine-handlebars",
"extend": "helpers/hbs/*.js"
}
}
or could I remove even the "extend" and all the helpers will get recognised too?
from patternlab-node.
Related Issues (20)
- Retrieve Google Fonts locally
- JavaScript error when opening the UI
- Bug: Code panels
- engine-twig-php: include-function syntax not matched by findPartials HOT 2
- startup error on TwigRenderer
- Nothing compiling to patterns folder HOT 1
- [Feature/Bug]: Code blocks in the markdown file do not show as code highlighted text HOT 8
- Rework how pattern lab loads UI-kits HOT 3
- Rework UI-kit Workshop
- Broken starter kit Twig Demo HOT 2
- Twig does not reload template on changes (PHP and node) HOT 3
- Rewrite Pattern Lab Core HOT 3
- Subitems would get cropped or disappear on vertical navigation
- PHP TwigRenderer Error when adding custom Twig extension via alter-twig.php HOT 1
- Patternlab and D10 / Twig 3 HOT 3
- [Vulnerability] Old version of lodash causing `npm audit` issues flagged HOT 2
- [Handlebars] Inconsistent data access when leveraging sibling JSON + partial blocks
- Migrate to Node 18
- Migrate from `pretty-quick` to `lint-staged`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patternlab-node.