Monday, June 23, 2014

Change Requirejs, Less compiler and CoffeScript versions in Play Framework

Hi there,
I've found myself struggling with Play 2.2.1 for one (really? just one???) reason: it comes with Less 1.4.2, that's a great CSS compiler but...

...according to the official Less' website, they've released the 1.7.x version!


And what's wrong with 1.4.2? Some bufixes and improvements, as usual, but what I really love is the possibility to pass rulesets to mixins as arguments: definitely great!

The biggest problem is that in our development stage we've frozen the project to Play 2.2.1 and there's no way to upgrade it. So, digging into Play's files I've discovered this wonderful folder:

your-play-path/framework/src/sbt-plugin/src/main/resources

there you can find less-x.x.x.js, coffeescript.js and r.js: just overwrite them and run

your-play-path/framework/build

then leave the console open and type
> compile
> publish-local

...enjoy!


Pietro

No comments:

Post a Comment