patternengine-php-twig icon indicating copy to clipboard operation
patternengine-php-twig copied to clipboard

What is the right documentation for the patternlab-config.json

Open DarkteK opened this issue 2 years ago • 0 comments

I used to have these packages:

"@pattern-lab/core": "^5.15.0",
"@pattern-lab/engine-twig-php": "^5.15.0",
"@pattern-lab/uikit-workshop": "^5.15.0",

And my patternlab-config.json file was created this way:


"engines": {
    "twig": {
      "namespaces": [
        {
          "id": "uikit",
          "recursive": true,
          "paths": [
            "./node_modules/@pattern-lab/uikit-workshop/views-twig"
          ]
        },
        {
          "id": "atoms",
          "recursive": true,
          "paths": [
            "./src/pattern-lab/_patterns/00-atoms"
          ]
        },
        {
          "id": "molecules",
          "recursive": true,
          "paths": [
            "./src/pattern-lab/_patterns/01-molecules"
          ]
        },
        {
          "id": "organisms",
          "recursive": true,
          "paths": [
            "./src/pattern-lab/_patterns/02-organisms"
          ]
        },
        {
          "id": "templates",
          "recursive": true,
          "paths": [
            "./src/pattern-lab/_patterns/03-templates"
          ]
        }
      ],
      "alterTwigEnv": [
        {
          "file": "alter-twig.php",
          "functions": [
            "addCustomExtension"
          ]
        }
      ]
    }
  }

Now that I finally updated my packages to:


"@pattern-lab/core": "^6.0.1",
"@pattern-lab/engine-twig-php": "^6.0.1",
"@pattern-lab/uikit-workshop": "^6.0.3",

The "twig" engines are not working, the npm run build command says that I haven't configured the twig engines properly.

I can't find an example nor (worst) documentation on how to accomplish this.

Can someone really help me please? I'll be glad, thanks

DarkteK avatar Oct 25 '23 13:10 DarkteK