patternlab | Make a pattern library using atomic design | Architecture library
kandi X-RAY | patternlab Summary
kandi X-RAY | patternlab Summary
Make a pattern library using atomic design.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Set the size of the viewport .
- Remove a key value
- update the given value
- Receive in an iframe message .
- Initializes the comment container
- Toggles comment on the page .
- Find the value of a cookie .
- Updates the viewport width of the viewport .
- Build the code view .
- Slides a comment in the parent block .
patternlab Key Features
patternlab Examples and Code Snippets
Community Discussions
Trending Discussions on patternlab
QUESTION
I'm having some trouble with Pattern Lab 3 plus Twig.
Following the instructions at https://patternlab.io/docs/installation.html
:
I install with:
npm create pattern-lab
.I choose
Twig (PHP)
as the templating language.I choose
Twig (PHP) demo patterns (full demo website and patterns)
as the the initial patterns
I do see the note The PHP version of Pattern Lab is being deprecated in favor of a new unified Pattern Lab core. The PHP docs for this topic can be viewed here.
. Clicking on the link just takes me to installtion page for PHP edition of PL v.2. Not helpful. So I press on to https://patternlab.io/docs/generating-pattern-lab.html
.
Next I'm supposed to run php core/console --watch
. There is no core sub-directory. Things are not looking promising.
I remove my PL installation and try again with handlebars templating. With one exception, all is good. The exception: I wanted twig templates.
Ideas?
...ANSWER
Answered 2020-May-01 at 14:00Indeed, the PatternLab website you saw around the time you posted this still reflected the 2.x/3.x days. Work is being done to get the legacy out and the current state in.
Last month, I contributed to this package: @pattern-lab/engine-twig
. This engine is a pure Javascript based twig engine which prevents the need for PHP. It uses the Twing library under the hood (since v5.8.0). There are still things to iron out, but I welcome you to try it. Please file bugs here:
QUESTION
I'm pretty new to patternlab and am just migrating my php based project onto the node version. I am having issues to access global data and block in a block file, which I didn't have previously.
I am using Pattern Lab Node v3.0
on Mac
, with Node v13.9.0
, using a Gulp
Edition with Twig.
source/_data/data.json
ANSWER
Answered 2020-Feb-25 at 14:30Macro's have their own variable scope. If you want to access any other defined variables you'd need to pass the special variable _context
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install patternlab
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page