google-code-export / wro4j

Automatically exported from code.google.com/p/wro4j
1 stars 1 forks source link

Fluent Interface Configuration #266

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to use wro4j as a fluent interface. Groovy example:

//in groovy
new WebResourceOptimizer([
    new File('app.js')
    new File('other.js')
]).process([
    new ImportCssProcessor(),
    new LessProcessor(), 
    new CoffeeScriptProcessor(),
    new RequireJsProcessor(new RequireJsOptions(key: value, key2: value2))
]).merge().process([
    new ClosureProcessor()
]).save('script.optimized.js')

or

new WebResourceOptimizer([
    new File('app.coffee.js')
    new File('other.coffee.js')
]).process([
    new CoffeeScriptProcessor(),
]).save{ it.name.replace('.coffee.js', '.js') }

The mailing list describing this is this: 
https://groups.google.com/forum/#!topic/wro4j/7CYk5q-G2pI

Original issue reported on code.google.com by alex.obj...@gmail.com on 1 Aug 2011 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 1 Aug 2011 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 2 Aug 2011 at 2:19