Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerendering dependencies does not work when child files are already watched #1888

Closed
sodoku opened this issue Mar 11, 2015 · 7 comments · Fixed by pugjs/pug-cli#1
Closed
Assignees

Comments

@sodoku
Copy link

sodoku commented Mar 11, 2015

#1086 addressed watching father files and their children jade files. It does not work for me, if the children are already being watched. Please see the example for more explanations.

Example

A main.jade which includes a.jade and b.jade

├── main.jade
├── includes/
    ├── a.jade (included from main.jade)
    ├── b.jade (included from main.jade)

working

If I watch only the main.jade

jade -w *.jade

the files a.jade and b.jade are automatically watched (as they are a dependency from main.jade). If I change a.jade, main.jade will be rerendered.

not working

If I watch all files

jade -w .

all files are being watched. But if I now change a.jade, only a.jade will be rerendered. main.jade will not be rerendered.

@netlemur
Copy link

+1

@TimothyGu
Copy link
Member

Darn it, now we actually have to build a tree of dependency.

@TimothyGu TimothyGu self-assigned this Mar 26, 2015
TimothyGu added a commit that referenced this issue May 31, 2015
TimothyGu added a commit that referenced this issue Jun 1, 2015
Loosely based on a patch by @richardgoater.

Closes #1967. Fixes #1888.
TimothyGu added a commit that referenced this issue Jun 1, 2015
Loosely based on a patch by @richardgoater.

Closes #1967. Fixes #1888.
@kahlil
Copy link

kahlil commented Jun 2, 2015

I have the same issue. Is there a current workaround?

@TimothyGu
Copy link
Member

@distilledhype not yet, until we merge my PR which will be in the next release (hopefully 2.0.0).

@kahlil
Copy link

kahlil commented Jun 2, 2015

@TimothyGu OK. Good to know that it is fixed already though. Any idea when that will be?

@kahlil
Copy link

kahlil commented Jun 15, 2015

@ForbesLindesay awesome that this is fixed now, but I assume I will have to wait until the release of Jade 2 in order to use it correct?

@ForbesLindesay
Copy link
Member

You could try using the new https://github.com/jadejs/jade-cli which will replace the built in jade binary in 2.0.0. It should already have all the updates.

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

Successfully merging a pull request may close this issue.

5 participants