-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add jade2php adapter #65
Comments
Yeah, or you could just fork accord & implement it like any other adapter. Also you might want to be careful with the way that jade-php mutates the jade instance. I've never used it before, but looking at the usage example, it seems like it duck-punches jade and might screw with the global jade instance. Not totally sure, but it looks hacky. |
Compiling jade still works even after running jade-php on loads of files. |
I mean when jade-php is being run within the same process as regular jade compilations. It's pretty simple to setup a dev env:
|
Oh, of course. thanks alot. As I barely have used testing so far I am not aware of use cases like this. |
Oh, our tests are mostly just comparing the result of compiling/rendering a bunch of files to known outputs. If you look around the tests directory you'll get the hang of it. |
Hey @FranzSkuffka -- thanks for pitching in! If you have never worked with this kind of environment it definitely could be some time and effort before you get used to it. If you are working on some code for this and need help, feel free to open up a "Work in progress" pull request (just put You should definitely get familiar with testing practices before submitting anything, this is pretty important for projects like accord. Check out the contributing file for some help. |
@Jenius i have checked out the contribution tips yesterday already and invested some time in copying the jade adapter tests etc. to test jade php. I think I'm somewhat down with the test workflow already as it makes perfect sense. |
jade2php, tho, is not production-ready either and needs quite some work. |
Ouch. Yeah this is something we sometimes discover in the process of trying to add adapters. This leads to either contributing back to the original library if we are particularly invested, or searching for a different solution, usually. |
Jade2php is ready for a production-ready release soon. I am glad you were able to make dogescript work! |
Ok cool! I guess we will wait until they are ready, then get merge in this pull request. Oh yeah dogescript was the first priority. Much important. Very wow. |
I will send another pull request once i've written a proper adapter. i even missed the @compile call this time.. |
Yeah, this is a good point. It's because it's the same in most adapters, but different in some. It just provides a way to catch any stray error that might be thrown from a compile method, really. Since it's different in a number of adapters, it is harder to pull out. You don't have to use it by any means, it's just usually useful for catching errors. If the compiler throws errors in a different way, for example, you don't need it. But by passing invalid code, I was able to get most adapters to throw an error, which can only be caught and passed on using a try/catch. You can see error tests for a number of the adapters, try to generate an error for yours and make sure it's caught, then you are in the clear! |
Aye aye captain. |
Closing as we've given up on this one for now |
Hey there,
|
I'm sorry, I don't have the bandwidth at the moment to be able to help. Hopefully someone else will be able to! |
The compiler interface should be similar, if not identical to jade's, so i would try this myself, but i have no idea how to set up an environmet to code and test accord adapters.
@Jenius could you help me out right there? that would be killer.
https://www.npmjs.com/package/jade-php
The text was updated successfully, but these errors were encountered: