joseph / ruby-clean-css

A Ruby interface to the Clean-CSS minifier for Node.
MIT License
10 stars 6 forks source link

execjs support #2

Open ryanstout opened 9 years ago

ryanstout commented 9 years ago

So after doing a bunch of research, clean-css is great. I'm currently using this gem in voltframework - https://github.com/voltrb/volt ) My users on windows are having trouble installing libv8, and it would be great if the windows users could use a different JS runtime. I'm not sure if there's libv8 specific features your using, but if your interested in adding execjs support, let me know and maybe I or someone else from the volt community could help.

Thanks!

ryanstout commented 9 years ago

Ok, upon further inspection, looks like you have to stub out a good chunk of the node api to get it to work, which it doesn't look like is possible with execjs.

ai commented 7 years ago

Any updates? We need it in our project too.

@joseph Say if you need any specific help.

joseph commented 7 years ago

Hi, this isn't an active project, and I don't know anything about Windows, but feel free to fork away.

ai commented 7 years ago

@joseph we need only remove libv8 and use execjs. It uses best JS engine on current machine. Fix will be very small. Here is how I do it in Autoprefixer Rails https://github.com/ai/autoprefixer-rails/blob/master/lib/autoprefixer-rails/processor.rb#L107-L112

joseph commented 7 years ago

Perhaps. At the time, I tried quite hard to use ExecJS rather than libv8. I don't recall the specific obstacles, but Ryan's point above sounds familiar. If you can make it work, I'm happy to look at a pull request.

ai commented 7 years ago

@gazay as Ruby developer of our project. do you want to help :D