New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False Positives for Missing Templates outside of pattern-lab
#1116
Comments
I'm having this issue as well, I think. Here's my versions:
I define these namespaces in my patternlab-config.json:
The only ones I get complaints about are in icons, and every new icon I
I don't get these for other |
@cbirdsong Seconding your observation that directory depth might have something to do with it, and thanks for it. I'm running the same package versions as you. ex:
|
I recently have been working on When I reference ( Probably, this is because the namespace support is something from the core Twig engine and not from PL. |
The twig engine parses the files using regex (engine_twig_php.js > findPartials) to extract the names of included and embedded patterns. Patternlab uses the result to generate the pattern hierarchy. Patternlab throws a warning when it can't find the pattern. |
I am using
"@pattern-lab/cli": "^0.0.3",
"@pattern-lab/core": "^3.0.5",
"@pattern-lab/engine-twig-php": "^3.0.6",
"@pattern-lab/starterkit-twig-demo": "^4.1.1",
"@pattern-lab/uikit-workshop": "^1.0.8",
on a linux docker container, on a mac (this behaviour occurs both in the container, as well as in OSX). Webpack is bundling my assets for me.
Expected Behavior
When I run a build of pattern-lab, it should only report a missing or broken reference if that twig template is actually missing.
Actual Behavior
For every twig file outside of the
pattern-lab
directory, I am getting an error along the following lines:However, this file is present. Furthermore, the build does not fail and the patterns all render just fine.
Steps to Reproduce
Place a twig template outside of the
pattern-lab
directory. Add an appropriate namespace to reference to the config. Then reference that pattern from withinpattern-lab
. Run a build. It should report that file as missing, but still render its page in PL.The text was updated successfully, but these errors were encountered: