Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Watch option is broken. #3

Open
monachilada opened this issue May 15, 2015 · 6 comments
Open

Watch option is broken. #3

monachilada opened this issue May 15, 2015 · 6 comments
Assignees
Labels

Comments

@monachilada
Copy link

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 dmolsen added the bug label May 15, 2015
@dmolsen dmolsen self-assigned this May 15, 2015
@dmolsen
Copy link
Member

dmolsen commented May 15, 2015

@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
Copy link

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
Copy link

TxHawks commented Jun 12, 2015

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

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

@lewisnyman
Copy link

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

@Stalski
Copy link

Stalski commented Apr 19, 2016

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
Copy link

Stalski commented Apr 19, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants