edition-php-twig-standard icon indicating copy to clipboard operation
edition-php-twig-standard copied to clipboard

Watch option is broken.

Open monachilada opened this issue 9 years ago • 6 comments

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 avatar May 15 '15 13:05 monachilada

@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.

dmolsen avatar May 15 '15 14:05 dmolsen

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 avatar Jun 12 '15 16:06 scottnath

@scottnath - I have it working with grunt-contrib-watch and grunt-shell:

shell: {
  patternlab: {
    command: 'php core/console --generate --patternsonly'
  }
}

TxHawks avatar Jun 12 '15 17:06 TxHawks

This seems to be working fine for me, with no gulp/grunt

lewisnyman avatar Oct 16 '15 10:10 lewisnyman

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.

Stalski avatar Apr 19 '16 09:04 Stalski

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.

Stalski avatar Apr 19 '16 10:04 Stalski