Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grails generate css/js resources

I am using coffeescript-resources and the lesscss-resources plugins, how can I generate the resources to get the raw js/css ?

I know I can package it then explode the war, but is there a way to get the outputs in a simpler way?

like image 637
Nix Avatar asked Feb 01 '26 22:02

Nix


1 Answers

When dealing with resources plugins, it's always useful to take a look at the actual resourceMappers to see how the generation is done.

It seems like the coffeescript plugin contains a CoffeeScriptEngine that compiles the coffeescript files, so you can call that directly ( Line 30 of https://github.com/edvinasbartkus/grails-coffeescript-resources/blob/master/grails-app/resourceMappers/CoffeeScriptResourceMapper.groovy ).

Similarly, the less compiler - https://github.com/paulfairless/grails-lesscss-resources/blob/master/grails-app/resourceMappers/LesscssResourceMapper.groovy

The way the grails resources plugin works makes it very difficult to get standalone files. You're better off using a tool in development like Codekit http://incident57.com/codekit/

like image 137
Tomas Lin Avatar answered Feb 03 '26 14:02

Tomas Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!