Questions tagged [patternlab.io]

Pattern Lab is, at its core, a static site generator. It combines platform-agnostic assets, like the Mustache-based patterns and the JavaScript-based viewer, with a PHP-based or Node-based "builder" that transforms and dynamically builds the Pattern Lab site. By making it a static site generator, Pattern Lab strongly separates patterns, data, and presentation from build logic.

Read more about Pattern Lab at http://patternlab.io/

52 questions
0
votes
1 answer

Patternlab / Twig Variable Interpolation doesn't work with string from json

I'm working on a project that's based on the twig patternlab framework. I'm using JSON files for most of my content, especially for pages. I want to integrate a link (build by an atom) into a text I got from my JSON file that has a placeholder for…
All Bits Equal
  • 731
  • 2
  • 10
  • 26
0
votes
1 answer

mustache partial not looping through the data passed down to it

I am using mustache in conjunction with enter link description herepattern lab to render out a list of items from a json data file. Given this data structure: { "states": { "dropdown": { "items": [ { "title": "CA" …
mheavers
  • 29,530
  • 58
  • 194
  • 315
0
votes
0 answers

ERROR TypeError: Cannot read property 'touched' of undefined in angular 2 with patternlab

I am using patternlab with angular 2 and in forms of angular 2 get the next error: ERROR TypeError: Cannot read property 'touched' of undefined at Object.View_CriticalInfoComponent_37._co [as updateDirectives]…
0
votes
1 answer

JSON not replacing variables

I'm using Twig PatternLab. I got a small issue with JSON and a Twig for loop. Atom 00-h3-black.twig:

{{ text.chevron }}

Molecule 00-mastertile.twig:
DorinV
  • 322
  • 2
  • 14
0
votes
1 answer

How to make Foundation and Pattern Lab, work for Drupal?

How to combine console Gulp with Twig? Thanks!
0
votes
1 answer

Twig direct include doesn't work, only "with"ing specific keys does

I'm using Pattern Lab with twig templates and having an issue with using objects directly in the with statement in includes. This is my teaser-content-blocks organism: {% set content_blocks = [ { teaser_photo: { url:…
Matt Fletcher
  • 8,182
  • 8
  • 41
  • 60
0
votes
2 answers

Handlebars Passing Data with Patternlab

I am using Patternlab, Handlebars and Gulp as a prototyping tool. Currently I have an organism that is trying to pass data to an atom in a loop. I am getting the following error. Error: Parse error on line 12: ...bLabels}} {{>…
caraclarke
  • 370
  • 1
  • 5
  • 24
0
votes
2 answers

Changes in CSS of Pattern Lab not working

I am new to Pattern Lab. I have installed Pattern Lab PHP Mustache Template. I can edit patterns and see changes on the output. However if I edit the css files, changes don't reflect on the output. I use php core/console --generate to generate files…
Mei
  • 61
  • 1
  • 1
  • 6
0
votes
1 answer

Passing JSON data in pattern | PatternLab

I want to include an atomic pattern and want to pass data from a JSON array below is code and JSON file. anchor-link.mustache {{ label }} footer-nav.mustache
Ritesh Kashyap
  • 364
  • 1
  • 16
0
votes
1 answer

Drupal 8 and Patternlab

I am doing a composer install of patternlab with Drupal 8. I installed the minimal starterkit theme to source/. when i run php core/console --generate i get the message "your styleguide won't render because I cannot find your styleguide files. are…
russ
  • 103
  • 1
  • 7
0
votes
1 answer

Data inheritence in twig pattern lab

I am using twig Pattern Lab includes with the longhand syntax (needed for integration reasons), aka {% include "@atoms/path/to/pattern.twig" %}. If I have variables defined in a pattern, and then include that pattern in another pattern, the included…
bronzehedwick
  • 2,862
  • 2
  • 22
  • 28
0
votes
1 answer

Are there ways to make pattern lab rebuild quicker (with node)?

For every change I make I need to wait for the files to rebuild. The built takes 80ms to 1.30 minutes. Is there a way to speed this up? Are there any dos and don'ts or is this how long it takes no matter what. I know might be due to many template…
relidon
  • 2,142
  • 4
  • 21
  • 37
0
votes
2 answers

How to fix the error of Maximum call stack size exceeded when using pattern lab?

In pattern lab Maximum call stack size exceeded error and I don't know why. I'm not doing anything that I haven't done before. In 01-molecules/02-cart/cart.mustache I have this code {{#miniCart}}
relidon
  • 2,142
  • 4
  • 21
  • 37
0
votes
1 answer

How can I add a wrapper on every two items in mustache loop?

I am trying to get this outcome when looping through json in mustache
This is the only thing I…
relidon
  • 2,142
  • 4
  • 21
  • 37
0
votes
0 answers

Building and processing a compile graph on a set of watched source files

I think this might be a quite common problem, but somehow it is hard to find suitable answers. Background I'm currently investigating how to speed up the node variant of Patternlab. It is basically a system where you create HTML template files…
user3001
  • 3,437
  • 5
  • 28
  • 54