edition-php-twig-standard
edition-php-twig-standard copied to clipboard
Watch option is broken.
When running php core/console --watch
I get the following error.
PHP Fatal error: __clone method called on non-object in /Users/Mike/Sites/Sources/patternlab/vendor/pattern-lab/core/src/PatternLab/Watcher.php on line 94
This only started happening today, previously it would at least run. Additionally, when it was running, it seems that hardcoded references to mustache
in Watcher.php
means twig files are not being watched and therefore not triggering a regeneration.
@monachilada -
The hardcode of the mustache extension issue has been fixed but I haven't cut a release of it. I'll look into the other bug.
hi @dmolsen
am I correct in seeing that the watch command does not work with twig templates as of now? Could there be a way around this with a gulp or grunt watch?
thanks, Scott
@scottnath -
I have it working with grunt-contrib-watch
and grunt-shell
:
shell: {
patternlab: {
command: 'php core/console --generate --patternsonly'
}
}
This seems to be working fine for me, with no gulp/grunt
I have an instance started from edition-php-twig-standard. Most things seem to work. However, the watcher is not built for twig ... it searches hardcoded on "mustache" files. So my question is:
- do I have the wrong vendor/pattern-lab/core/PatternLab/Watcher.ph file? if so how did this happen?
- or is this branch not yet usable.
thx in advance.
Hi, Excuse me. I found the fix in dev-master :) That version is agnostic to mustache files. Glad to see this version will be ideal for usage into Drupal.