I talked to the maintainer, and confirmed that this project isn't currently active. I am reviewing my schedule to see if I have the time to take it over and complete it. I'll keep you guys updated.
Hi all - I've just spent the evening working on a nice solution to getting CoffeeScript PHP working well in Drupal and have managed to pull something together. Namely:
1. Expand the prepro module (http://drupal.org/project/prepro) so it supports preprocessing javascript (it does CSS at the moment)
2. Write a module which integrates prepro module with CoffeeScript PHP library.
So, you should be able to get CoffeeScript working as follows:
Then you should find that any *.coffee file added using drupal_add_js, i.e.
1. In code: drupal_add_js(drupal_get_path('module', 'mymodule') . '/myscript.coffee');
2. In the info file of a module/theme: scripts[] = "myscript.coffee"
will get compiled / cached automatically. Whoop!
Additionally the module provides a function for quickly compiling a coffeescript string into javascript in code: coffeescript_php_parse($coffeescript_string);
The CoffeeScript PHP sandbox project I've made would be better served by living at the namespace of this project I think, if people are happy with the implementation.
I support this idea. ryan.armstrong maybe you can ask the maintainer to make jamsilver a maintainer if you are in touch with them? That's much faster than the abandoned projects process. Then you only have a file an issue in the webmasters queue to transfer project ownership, and those usually get handled pretty fast.
Asking the current maintainer to add you as maintainer is the first step of the abandoned project process. And if the maintainer responds, they can add you directly, not need to involve the webmasters queue. It's only if they don't respond that it takes 2 weeks.
@jamsilver i tested your solution and works awesome!
Well this notice is displayed:
Notice: Constant VERSION already defined in require_once() (line 5 of /Users/gnuget/Sites/drupal_development/drupal7/sites/all/libraries/coffeescript-php/src/CoffeeScript/Init.php).
But i think to this is issue from the coffescript-php library and not from your module
I hope to the people from the prepo module accept your patch. works great
Cool - I've converted my code over to the 'coffeescript' namespace and pushed it into the 7.x-1.x branch.
I'm not currently able to test it (version of PHP on my work machine is < 5.3), so if someone wants to do a quick sanity check of it and say that it works here then I'll close it off.
When the patch gets into Prepro I expect we'll do a proper release of the code here.
@gnuget: Yes, that notice is caused by the CoffeeScript PHP library - not much we can do. If people are available to help out development of the library then go for it! I will not be able to devote any time to it myself.
Comments
Comment #1
warwickmc commented+1 on that, very interested in this...
Comment #2
ryan.armstrong commentedSame here, but if you look at the project page, there is no longer anyone listed as the maintainer. Not a good sign.
Comment #3
thedavidmeister commentedthat's a shame.
Comment #4
ryan.armstrong commentedI talked to the maintainer, and confirmed that this project isn't currently active. I am reviewing my schedule to see if I have the time to take it over and complete it. I'll keep you guys updated.
Comment #5
jamsilver commentedHi all - I've just spent the evening working on a nice solution to getting CoffeeScript PHP working well in Drupal and have managed to pull something together. Namely:
1. Expand the prepro module (http://drupal.org/project/prepro) so it supports preprocessing javascript (it does CSS at the moment)
2. Write a module which integrates prepro module with CoffeeScript PHP library.
So, you should be able to get CoffeeScript working as follows:
1. Install prepro module: http://drupal.org/project/prepro
2. Patch it with this: #1602174: Add support for JS preprocessing
3. Install my CoffeeScript PHP sandbox project: http://drupal.org/sandbox/jamsilver/1602184
4. Download the CoffeeScript PHP library from github (https://github.com/alxlit/coffeescript-php) and pop it in a libraries folder somewhere (e.g.
)
Then you should find that any *.coffee file added using drupal_add_js, i.e.
1. In code:
drupal_add_js(drupal_get_path('module', 'mymodule') . '/myscript.coffee');2. In the info file of a module/theme:
scripts[] = "myscript.coffee"will get compiled / cached automatically. Whoop!
Additionally the module provides a function for quickly compiling a coffeescript string into javascript in code:
coffeescript_php_parse($coffeescript_string);The CoffeeScript PHP sandbox project I've made would be better served by living at the namespace of this project I think, if people are happy with the implementation.
Comment #6
sreynen commentedFYI, the process for taking over an abandoned project (e.g., apparently, this one) is here: http://drupal.org/node/251466
Since it takes up to 2 weeks, I suggest starting it soon. You can always change your mind later.
Comment #7
wizonesolutionsI support this idea. ryan.armstrong maybe you can ask the maintainer to make jamsilver a maintainer if you are in touch with them? That's much faster than the abandoned projects process. Then you only have a file an issue in the webmasters queue to transfer project ownership, and those usually get handled pretty fast.
Comment #8
sreynen commentedAsking the current maintainer to add you as maintainer is the first step of the abandoned project process. And if the maintainer responds, they can add you directly, not need to involve the webmasters queue. It's only if they don't respond that it takes 2 weeks.
Comment #9
gnuget@jamsilver i tested your solution and works awesome!
Well this notice is displayed:
But i think to this is issue from the coffescript-php library and not from your module
I hope to the people from the prepo module accept your patch. works great
Comment #10
maedi commentedGreat stuff guys! :) Jam Silver I've just made you a maintainer / admin. I like the use of Prepro too.
Comment #11
jamsilver commentedCool - I've converted my code over to the 'coffeescript' namespace and pushed it into the 7.x-1.x branch.
I'm not currently able to test it (version of PHP on my work machine is < 5.3), so if someone wants to do a quick sanity check of it and say that it works here then I'll close it off.
When the patch gets into Prepro I expect we'll do a proper release of the code here.
@gnuget: Yes, that notice is caused by the CoffeeScript PHP library - not much we can do. If people are available to help out development of the library then go for it! I will not be able to devote any time to it myself.
Comment #12
gnugetI tested again the module getting the code directly from here and works fine, i think to we can close this issue.
Also i will send a push request to the CoffeeScript PHP's people for rename their VERSION constant.
Comment #13
maedi commentedThanks gnuget. Have just created a dev release on the project page.
Comment #14
maedi commentedComment #15
gnugetFYI
I created a pull request for re-name the constant VERSION in the coffee script php library:
https://github.com/alxlit/coffeescript-php/pull/8
Comment #16
gnugethttps://github.com/alxlit/coffeescript-php/pull/8
Well the issue related with the VERSION constant is fixed :-)
Comment #17
jamsilver commentedNice work.
Comment #18
thedavidmeister commentedSteps in #5 work great for me :) can't wait to see this turn into a "real" project so i can get my co-workers on board.
Comment #19
maedi commentedPrepro now has JS support, module should work out of box. #1602174: Add support for JS preprocessing
Comment #20
thedavidmeister commentedSaweet :)