pattern-lab / edition-php-twig-standard

Pattern Lab Standard Edition for Twig
http://patternlab.io/
MIT License
103 stars 32 forks source link

Watch option is broken. #3

Open monachilada opened 9 years ago

monachilada commented 9 years ago

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.

dmolsen commented 9 years ago

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

scottnath commented 9 years ago

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

TxHawks commented 9 years ago

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

shell: {
  patternlab: {
    command: 'php core/console --generate --patternsonly'
  }
}
lewisnyman commented 8 years ago

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

Stalski commented 8 years ago

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:

thx in advance.

Stalski commented 8 years ago

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.