sbt-closure icon indicating copy to clipboard operation
sbt-closure copied to clipboard

Suitable for Play?

Open huntc opened this issue 12 years ago • 3 comments

Hi there Tim,

What would it take to make this plugin something suitable for Play? We're thinking of factoring out the JS Compiler of Play for 2.3. The JS Compiler is essentially a wrapper for Google's Closure compiler.

Thanks. Christopher

huntc avatar Oct 23 '13 00:10 huntc

Hi Christopher,

I'm not sure what would be needed to make this suitable for play. What are the requirements?

This is also a wrapper for Google's Closure compiler, but adds a way to combine all of the files, using a manifest. It should work with any type of webapp as is.

eltimn avatar Oct 23 '13 13:10 eltimn

We presently look for any js file in the app/assets/javascripts folder and put them through the closure compiler - we also ignore files starting with an "_". Any js file selected can then become the entry point for Require/Common/Js considerations. Js files can also reside in the public/assets/javascripts but they are not processed by the closure compiler.

That's about it.

Here's some pertinent documentation: http://www.playframework.com/documentation/2.2.x/AssetsGoogleClosureCompiler

Do you want to give it a go and play with Play a little? :-)

huntc avatar Oct 23 '13 22:10 huntc

Actually, I don't use this anymore and am not interested in putting much work into it. I also have no interest in using Play.

Also, as I've stated, this uses a manifest file, so that all files can be combined. If you're using RequireJS, that probably isn't desirable. So, that would be a major change.

I think you might be better off just writing a new plugin. I don't think it would be that difficult. Feel free to fork this repo as a starting point if you want.

eltimn avatar Oct 24 '13 12:10 eltimn