Open jeffmay opened 11 years ago
@softprops Nevermind, I found the problem. My directory was named app/assets.javascripts/
because IDEA failed to rename it properly.
Anyway, I switched to using Play's internal CoffeeScript compiler with WebJars. See my example project
Hey again,
I am still having issues with getting CoffeeScript set up with Play.
As you may remember from https://github.com/softprops/coffeescripted-sbt/issues/17, I was having trouble setting up CoffeeScript so that it would compile from the correct source directory to the correct resource directory. I didn't mention that after I did this, my Play build broke. I resorted to just using JavaScript (yuck). You can see the ticket I posted on Play's issue tracker for more info.
I thought I would get back to you about this to let you know that I am having trouble with getting this set up. It appears that I was having 3 issues going on in this project that made my situation unique:
I found that 2 and 3 were incompatible and reported the issue with Play.
Another Attempt
I decided to give coffee script another try. I think the problem was that after adding coffee script directory to the
resourceManaged
setting, Play was upset by where I was managing resources (in that it didn't know how to deploy theresourceManaged
directory, because it wasn't in Play's structured build layout). I thought the solution would be to reuse Play's natural way for deploying coffee script (as outlined here).Even after using the correct project layout, no coffee script is compiled. If you clone this example project and run the project, you will see that nothing is compiled to the
target/scala-2.10/resources_managed/main
directory as it is supposed to.The index page will load properly, but if you delete the whole
public/javascripts
directory, you'll notice that the page can't load any javascript. So now I'm back to the same issue again.So now I switched back to using your plugin.
I need to compile the javascript to
public/javascripts
to get the project to work, but Play won't let me because I get errors like:And when I use what should "just simply work":
I see:
I can't figure out how the heck I can use coffee script with angular. Since Play's coffee script compiler is still a mystery, I want to use your plugin to compile my scripts without breaking Play. Any ideas how I can accomplish this, I'm running out of steam on this, and I'm sure others are looking for a good solution too.
For the time being, I am going to use a separate Cake file and coffee script compiler to compile the files to the public directory without breaking Play.
Thanks ahead of time!