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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix callback arguments on compile, so we trigger dependencies correctly #1
Conversation
Thanks @lalomartins I'll look at this when I have a moment spare. |
@lalomartins Can you tell me more about your environment? Brunch version, etc. These changes seem to make no difference to me. My projects run correctly, with changes to included jade files triggering compilation. |
I'm using it in the office, and I'm not there today, and I don't have access to the repos from outside :-( so I can let you know for sure Monday. But I can tell you from memory: Ubuntu 14.04, Node 0.12.7, latest brunch installed via npm, latest jade-static-brunch via npm (both local installs). |
There's a discussion about it at brunch/brunch#916 and, well, looking at the brunch source, I don't see how it can possibly be working for you, unless you're using a version of brunch < 1.7.0. See also brunch/brunch#557 |
Okay I'll have a further look into it. I'm surprised because I created this repo specifically to handle dependencies that didn't work with the other static jade plugins, and as I say I haven't experienced the issue myself.
|
Since you created this repo this year according to the commit history, it's definitely targeting brunch > 1.7.0; and yet, looking at the brunch sources, I can't imagine how it could possibly work 馃榾 what a mystery. Anyway, there seems to be some support for adding static file generation to brunch core, and I'll probably be starting a branch soon (already forked the repo even). So if you're not sure about merging, it's probably safe to just leave it alone for now (and those who need it can just use it from my branch via git reference in package.json, which is what I'm doing here). There is in fact the unfortunate side-effect that it generates an empty JS module in the output (which I worked around by joining it to a |
Ok, cheers. I'm going to leave it open for now and will try to get to the bottom of it at some point when I have more time. |
Took a quick look at this today and these changes no longer pass the included tests, which do cater for includes. Are you getting the same results? |
I didn't get it. You got what result? |
Scratch that last comment. I must of been doing something stupid to get those errors. This is seems fine to me and am happy to merge, even regarding:
|
fix callback arguments on compile, so we trigger dependencies correctly
Yes, it generates an empty JS module with the content of last-unmatched-jade-file, but it doesn't hurt. I'm simply ignoring that file for now. |
FYI, this is now available in v1.8.3 on NPM. |
After about an hour debugging why brunch wasn't picking up changes on my include files 馃槈 I realised you're calling the callback with invalid arguments. By returning (null, '') we trigger getDependencies correctly.