Open DominicWatson opened 12 years ago
@DominicWatson - are you still working towards this?
I have just recently started playing with Coffeescript, and the first thing I found was that cfstatic has a rather old version through jcoffeescript which has effectively been abandoned.
Seems easy enough to replace coffee-script.js in the JAR, but would be much nicer to externalise the script so it was easier to keep up to date. Also Coffeescript now supports Source Maps in 1.6.x - being able to generate those in debug mode would be awesome.
Having a pluggable mechanism for the file handlers would be pretty cool - that way people could pick and choose or write new providers, you could then (maybe) maintain them separately from the cfstatic core too.
Anyway, just some thoughts and comments! If you have something on a feature branch that hasn't been published I'd be interested in checking it out.
Use JavaScript based libraries for all compilers and wrap them using Java's javax.script.ScriptEngineManager. i.e.
jsEngine = CreateObject( 'java', 'javax.script.ScriptEngineManager' ).getEngineByName( 'JavaScript' );
The aim is to remove the dependency on JavaLoader and all the jars currently being used in the project.
For minification, use csso and UglifyJs. LESS and CoffeeScript are already js libraries that we are loading through Java wrappers. Once done, we can add JSLint and CSSLint through the same mechanism.