SE7ENSKY / jade2php

Unlock Jade for PHP! Convert Jade templates into raw PHP templates. CLI tool and JavaScript API. Test covered.
43 stars 10 forks source link

Rework, [tested, version number updated] #9

Closed janwirth closed 9 years ago

janwirth commented 9 years ago

You may now just type 'make publish' if you have ruby installed & the module will be compiled, published and reversed to pre-compile state. This structure and workflow is adopted from jenius' node module project structure. https://github.com/jenius/accord

ivankravchenko commented 9 years ago

Usual npm publish isn't sufficient?

janwirth commented 9 years ago

when using this plugin with other modules such as accord, the require call fails when the full module stack is not written in js.

so even though we all love and cherish coffeescript, this eliminates the hassle for those that don't use it but still love jade2php.

janwirth commented 9 years ago

As this is written in coffeescript, it will be unaccessible to people that do not use coffeescript and it will break if it is used by modules that are not written in coffeescript, which is basically every other node package. not compiling the source is effectively locking it out of the ecosystem.

ivankravchenko commented 9 years ago

Oh, yes, I understand :) I've just not paid much attention on publishing SE7ENSKY/jade2php. I just wanted it to be tested on several real-world projects, then polished and published. Now it is tested on several websites. It also have a little subset of non-working edge-cases, but I think it is ready, so I pay some attention on publishing.

janwirth commented 9 years ago

I prepared it for proper publishing, as i said, adopting from jenius' module architecture. he has published many different node modules and tools.

let's make sure there is a way to call php functions within tags, without prepended attribut identifiers, fix the doctype bug and publish that thing. for the greater cause!

i am currently working on an adapter for accord, which unifies precompiled languages. The next step would be to create a roots.cx template that is perfect for wordpress development. you should check out roots.cx. :)

ivankravchenko commented 9 years ago

I appreciate your contribution, but done much similar way in 1.1.6, 8f11ee4. Sources are in git, compiled files in npm. Please review, if that publishing fits :)

janwirth commented 9 years ago

I saw that already and learned from it. Your approach makes way more sense than mine. Everything seems fine; Require calls work in both coffeescript and js. However before publishing a new version the &(function()) feature should be supported imho.