untyped / sbt-plugins

SBT plugins for Javascript, Coffeescript, LESS, SASS, and Mustache compilation
73 stars 23 forks source link

Upgrade closure-compiler to r1592 and rhino-js to 1.1.5 #6

Closed eltimn closed 12 years ago

eltimn commented 12 years ago

Some other small tweaks as well.

davegurnell commented 12 years ago

Hi Tim,

Thanks for the updates - all good stuff.

I traced the Less CSS problems and borrowed some code from less-sbt to get around them.

Basically, the unmodified code for less.js expects Rhino to be running on the command line rather than as a library. The difference is you get a lot more global variables for various purposes. less.js detects Rhino/Node/browsers by detecting features of the environment. They changed the code after version 1.1.3 and broke everything for library rhino.

Doug Tangren got around this in less-sbt by doing two things:

I've stolen this code from less-sbt so I can support more recent versions of Less CSS (I need to email Doug to thank him for this). I've also updated sbt-less to add a SettingKey to let the developer choose which version they're using:

LessKeys.lessVersion in LessKeys.less := LessVersion.Less113 or LessKeys.lessVersion in LessKeys.less := LessVersion.Less115

The default version is currently 1.1.5. I've started looking at 1.2.1 but there are additional problems. Most likely the interface to Less has changed. I'll tinker some more tonight.

Best regards,

-- Dave

On 6 Feb 2012, at 21:09, Tim Nelson wrote:

Some other small tweaks as well.

You can merge this Pull Request by running:

git pull https://github.com/eltimn/sbt-plugins master

Or you can view, comment on it, or merge it online at:

https://github.com/untyped/sbt-plugins/pull/6

-- Commit Summary --

  • Upgrade closure-compiler to r1592 and rhino-js to 1.1.5

-- File Changes --

M project/Build.scala (45) M sbt-js/src/main/scala/untyped/js/Plugin.scala (38) A sbt-less/src/main/resources/less-rhino-1.1.5.js (2481) M sbt-less/src/main/scala/untyped/less/LessSource.scala (25) M sbt-less/src/main/scala/untyped/less/Plugin.scala (30)

-- Patch Links --

https://github.com/untyped/sbt-plugins/pull/6.patch https://github.com/untyped/sbt-plugins/pull/6.diff


Reply to this email directly or view it on GitHub: https://github.com/untyped/sbt-plugins/pull/6