Open francisdb opened 10 years ago
Once the 1.6.0 will be ready I will be happy to merge a pull request implementing this. I’m not sure I’ll have time to implement it by myself.
ok, might give a shot at it once 1.6.0 is out
Is there any documentation on how to implement an asset generator?
you could check these projects https://github.com/patiencelabs/play-stylus https://github.com/jlitola/play-sass
@johdah let me know if you have a go at it...
Yes
I chose to write a Python script to do the conversion instead and let Intellij trigger it when I changed the language files.
Had a go at implementing this, quick and dirty
issues:
https://github.com/francisdb/play-jsmessages/commit/baf27d89a28e78d2dc0ee2389bfeb6fb85e9db94
how to use: Publish locally in sbt
publishLocal
Add the settings to your play project
.settings(jsmessages.plugin.JsMessagesPlugin.jsmessagesSettings:_*)
Add the plugin to plugins.sbt
addSbtPlugin("org.julienrf" % "jsmessages-plugin" % "1.6.0-SNAPSHOT")
messages.xxx.js files should end up in the javascripts in the resources_managed folder
What do you think? Something to build upon? Worth the hassle?
messages.xxx.js files should end up in the javascripts in the resources_managed folder
I think it would be better if messages could still be shared between server-side and client-side. Is it possible to keep the conf/messages.xxxx location?
Otherwise, does the new way to handle assets in Play 2.3 change something? Maybe we should make an sbt-web plugin?
I suppose you misunderstood me? I'm just saying where the .js versions are generated. Not that you have to move the messages.xxx files. No idea bout 2.3, big changes?
I'm just saying where the .js versions are generated. Not that you have to move the messages.xxx files.
Ok, great!
No idea bout 2.3, big changes?
It seems.
The hard part is to reproduce the play messages classpath loading without a running play application. Everything else is quite trivial. Related to 2.3, I see no change in trunk, last commit to the asset compiler was 7 months ago.
Hmm, looks indeed linke we should switch to an actual sbt plugin http://www.playframework.com/documentation/2.3.x/Migration23
The above example shows SbtWeb being added to the root project of a build. In the case of SbtWeb there are other plugins that become enabled if it is e.g. if you also had added the sbt-less-plugin via addSbtPlugin then it will become enabled just because SbtWeb has been enabled. SbtWeb is thus a “root” plugin for that category of plugins.
sorry to pick this old issue up.. what is the status of this?
It has not been implemented. You can give it a try, if you want :)
haha, i am not a scala developer (yet) but i will add it to my todo-list.. maybe some time later :D thanks for the fast response! all the best and happy new year
Would it not be better to have this plugin as an asset generator?