Open B-Prod opened 6 years ago
Confirmed that 1.1.x breaks gulp compilation for me too. Reverting to 1.0.0 allows it to work
I also dealt with this issue on 1.1, will need to revert it.
Same here. Running composer upgrade
for the first time since November 2017 to update composer.lock
with this upgrade info:
Results in this relative path error on compile:
Upgrading all all dependencies except this one works fine again.
Quick note, update your require
entry to:
"evanlovely/plugin-twig-namespaces": "~1.0.0"
And then run composer update
to lock to patch level updates only.
Adding an explicit "baseDir" key to pattern-lab/config/config.yml helps get around the missing directory error on 1.1.1, but appears to break how the styleGuideKitPath get rendered. Is there a feasible way to resolve the baseDir path rather than concatenating?
Switching from version 1.0.0 to 1.1.1 make the compilation fail.
All the paths used to find the templates are wrong. Here is an example:
configuring pattern lab... PHP Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'The "../source/_patterns/00-base" directory does not exist ("/Users/xyz/mypath/../source/_patterns/00-base").' in /"/Users/xyz/mypath/pattern-lab/vendor/twig/twig/lib/Twig/Loader/Filesystem.php:101 Stack trace:
0 /"/Users/xyz/mypath/pattern-lab/vendor/evanlovely/plugin-twig-namespaces/src/PatternLab/TwigNamespaces/PatternLabListener.php(64): Twig_Loader_Filesystem->addPath('../source/_patt...', 'base')
1 [internal function]: PatternLab\TwigNamespaces\PatternLabListener->addTwigNamespaces(Object(Symfony\Component\EventDispatcher\Event), 'twigLoaderPreIn...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
2 /"/Users/xyz/mypath/pattern-lab/vendor/symfony/ev in /"/Users/xyz/mypath/pattern-lab/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 101
The directory structure is similar than the one defined in the README file:
── pattern-lab │ ├── composer.json │ ├── composer.lock │ ├── core │ ├── public │ └── vendor ├── source │ ├── _annotations │ ├── _data │ ├── _layouts │ ├── _macros │ ├── _meta │ ├── _patterns │ ├── _twig-components │ ├── favicon.ico │ └── styleguide
Reverting to the 1.0.0 version fixes the issue and the compilation succeed.