[2.0] Closure compiler doesn't work with simple JS?

1,771 views
Skip to first unread message

Simon

unread,
Mar 18, 2012, 6:34:27 PM3/18/12
to play-fr...@googlegroups.com
Hi,

I have been following this page in the wiki:


I create lib.js and test.js in the app/assets/javascripts folder and no matter what I do I get "Internal Closure Compiler error (see logs)" and it points to line 0

Has anyone followed the instructions in the wiki page above? I cant get it to work no matter what I do.

Thanks,
Simon

Simon

unread,
Mar 18, 2012, 9:51:26 PM3/18/12
to play-fr...@googlegroups.com
I created a new play project and then created a file called "test.js" in the app/assets folder and it gave the same error.

It seems like Play wont compile simple JS files. Any ideas? 

I get the following error:

[error] application -

! Internal server error, for request [GET /] ->

sbt.PlayExceptions$AssetCompilationException: Compilation error [Internal Closure Compiler error (see logs)]
        at play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:53) ~[na:na]
        at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417) ~[na:na]
        at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417) ~[na:na]
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.scala:378) ~[na:na]
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.scala:376) ~[na:na]
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200) ~[scala-library.jar:0.11.2]
java.lang.RuntimeException: java.lang.RuntimeException: com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideException: module$test
        at com.google.javascript.jscomp.Compiler.runCallable(Compiler.java:629)
        at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:574)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:556)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:515)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:497)
        at com.google.javascript.jscomp.Compiler.compile(Compiler.java:483)
        at play.core.jscompile.JavascriptCompiler$$anonfun$compile$1.apply$mcZ$sp(JavascriptCompiler.scala:44)
        at play.core.jscompile.JavascriptCompiler$$anonfun$compile$1.apply(JavascriptCompiler.scala:44)
        at play.core.jscompile.JavascriptCompiler$$anonfun$compile$1.apply(JavascriptCompiler.scala:44)
        at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:110)
        at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:110)
        at scala.util.control.Exception$Catch.apply(Exception.scala:88)
        at scala.util.control.Exception$Catch.either(Exception.scala:110)
        at play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:44)
        at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
        at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.scala:378)
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.scala:376)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
        at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:60)
        at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:44)
        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
        at scala.collection.mutable.ArrayBuffer.flatMap(ArrayBuffer.scala:44)
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1.apply(PlayCommands.scala:376)
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1.apply(PlayCommands.scala:363)
        at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:476)
        at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:476)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:41)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.scala:295)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.scala:295)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$5.work(System.scala:67)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:221)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:221)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:227)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221)
        at sbt.CompletionService$$anon$1$$anon$2.call(CompletionService.scala:26)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideException: module$test
        at com.google.common.base.Throwables.propagate(Throwables.java:156)
        at com.google.javascript.jscomp.Compiler.processAMDAndCommonJSModules(Compiler.java:1396)
        at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1232)
        at com.google.javascript.jscomp.Compiler.parse(Compiler.java:678)
        at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:636)
        at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:70)
        at com.google.javascript.jscomp.Compiler$1.call(Compiler.java:559)
        at com.google.javascript.jscomp.Compiler$1.call(Compiler.java:556)
        at com.google.javascript.jscomp.Compiler$2.run(Compiler.java:601)
        ... 1 more
Caused by: com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideException: module$test
        at com.google.javascript.jscomp.deps.SortedDependencies.getInputProviding(SortedDependencies.java:120)
        at com.google.javascript.jscomp.JSModuleGraph.manageDependencies(JSModuleGraph.java:325)
        at com.google.javascript.jscomp.Compiler.processAMDAndCommonJSModules(Compiler.java:1389)
        ... 8 more
[error] {file:/D:/Dropbox/Dev/HomeHerld/ScalaWorkspace/test_app/}test_app/*:play-copy-assets: PlayException: Compilation error [Internal Closure Compi
ler error (see logs)]
[error] application -

! Internal server error, for request [GET /] ->

sbt.PlayExceptions$AssetCompilationException: Compilation error [Internal Closure Compiler error (see logs)]
        at play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:53) ~[na:na]
        at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417) ~[na:na]
        at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417) ~[na:na]
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.scala:378) ~[na:na]
        at sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.scala:376) ~[na:na]
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200) ~[scala-library.jar:0.11.2]

Ben McCann

unread,
Mar 18, 2012, 11:11:41 PM3/18/12
to play-fr...@googlegroups.com
The Closure compiler integration is broken I believe.  I've seen several threads about it and no one seems to have gotten it work.  I submitted a pull request a month ago and am waiting for it to be committed:

-Ben

Eishay Smith

unread,
Mar 18, 2012, 11:21:49 PM3/18/12
to play-fr...@googlegroups.com
It does work for me, though I can't configure it (waiting for Ben's patch). 
Out of the box it does minification and reports an error when where and how the js compilation breaks.

Did you try placing a file with one simple line that you know must work?



--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/RstgxyrVgm0J.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Simon

unread,
Mar 18, 2012, 11:33:29 PM3/18/12
to play-fr...@googlegroups.com
That's what I tried. =(

coffee files work for me (commonJS requires don't). JS files in the same directory "app/assets" always bring up an error no matter how simple and correct the javascript is. 

Declaring globals in coffee files are pretty much impossible because everything is encapsulated in a function call when compiled. Although I really don't want to use globals, "requires" aren't working.

To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Simon

unread,
Mar 18, 2012, 11:35:42 PM3/18/12
to play-fr...@googlegroups.com
Thanks Ben.

If this gets fixed it would be the cherry on the ice cream for me.

Eishay Smith

unread,
Mar 21, 2012, 3:38:48 PM3/21/12
to play-fr...@googlegroups.com
Google closure works fine on my Mac dev env. I tried to setup the same project on a friend's windows machine and got the MissingProvideException reported above. Could it be an os specific issue? 
Simon, what OS do you use?

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/UToOYcthnZQJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.

Ben McCann

unread,
Mar 21, 2012, 3:48:25 PM3/21/12
to play-fr...@googlegroups.com
I wouldn't be surprised if it's broken on Windows.  There were a bunch of places where "/" was hardcoded.  I submitted a patch to the Closure Compiler to replace it with File.Separator, but Play will need to be updated to use the latest version of the Closure Compiler in order to get that patch (even then it might not work as I didn't test it on a Windows machine, but it should be closer).

-Ben

Carsten Hufe

unread,
Mar 21, 2012, 2:54:53 PM3/21/12
to play-framework
I have this problem only in Windows 7, on my Mac it works!

Ben McCann

unread,
Mar 21, 2012, 4:46:15 PM3/21/12
to play-fr...@googlegroups.com
I filed a bug for the fact that it's broken in Windows.  Hopefully they'll update the version of the Closure Compiler soon as that may fix the issue.


--
You received this message because you are subscribed to the Google Groups "play-framework" group.

rssh

unread,
Mar 21, 2012, 5:34:55 PM3/21/12
to play-framework

For now require in js works only when we use minimized result file.
(see https://play.lighthouseapp.com/projects/82401/tickets/193-javascript-require-support-in-non-minimized-files
)

rssh

unread,
Mar 21, 2012, 6:01:54 PM3/21/12
to play-framework

Same error descibed in next thread:
http://groups.google.com/group/play-framework/browse_thread/thread/d6ffb119f796c9a9/0d9e492538ee7d08?lnk=gst&q=rssh#0d9e492538ee7d08

On Mar 19, 3:51 am, Simon <simons.m...@gmail.com> wrote:
> I created a new play project and then created a file called "test.js" in
> the app/assets folder and it gave the same error.
>
> It seems like Play wont compile simple JS files. Any ideas?
>
> I get the following error:
>
> [error] application -
>
> ! Internal server error, for request [GET /] ->
>
> sbt.PlayExceptions$AssetCompilationException: Compilation error [Internal
> Closure Compiler error (see logs)]
>         at
> play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:53 )
> ~[na:na]
>         at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
> ~[na:na]
>         at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
> ~[na:na]
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.s cala:378)
> ~[na:na]
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.s cala:376)
> ~[na:na]
>         at
> scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.s cala:200)
> ~[scala-library.jar:0.11.2]
> java.lang.RuntimeException: java.lang.RuntimeException:
> com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideExceptio n:
> module$test
>         at
> com.google.javascript.jscomp.Compiler.runCallable(Compiler.java:629)
>         at
> com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:574 )
>         at com.google.javascript.jscomp.Compiler.compile(Compiler.java:556)
>         at com.google.javascript.jscomp.Compiler.compile(Compiler.java:515)
>         at com.google.javascript.jscomp.Compiler.compile(Compiler.java:497)
>         at com.google.javascript.jscomp.Compiler.compile(Compiler.java:483)
>         at
> play.core.jscompile.JavascriptCompiler$$anonfun$compile$1.apply$mcZ$sp(Java scriptCompiler.scala:44)
>         at
> play.core.jscompile.JavascriptCompiler$$anonfun$compile$1.apply(JavascriptC ompiler.scala:44)
>         at
> play.core.jscompile.JavascriptCompiler$$anonfun$compile$1.apply(JavascriptC ompiler.scala:44)
>         at
> scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala: 110)
>         at
> scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala: 110)
>         at scala.util.control.Exception$Catch.apply(Exception.scala:88)
>         at scala.util.control.Exception$Catch.either(Exception.scala:110)
>         at
> play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:44 )
>         at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
>         at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.s cala:378)
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.s cala:376)
>         at
> scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.s cala:200)
>         at
> scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.s cala:200)
>         at
> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala: 60)
>         at
> scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:44)
>         at
> scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
>         at
> scala.collection.mutable.ArrayBuffer.flatMap(ArrayBuffer.scala:44)
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1.apply(PlayCommands.scala:376)
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1.apply(PlayCommands.scala:363)
>         at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:476)
>         at sbt.Scoped$$anonfun$hf5$1.apply(Structure.scala:476)
>         at scala.Function1$$anonfun$compose$1.apply(Function1.scala:41)
>         at
> sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.sca la:295)
>         at
> sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.sca la:295)
> com.google.javascript.jscomp.Compiler.processAMDAndCommonJSModules(Compiler .java:1396)
>         at
> com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1232)
>         at com.google.javascript.jscomp.Compiler.parse(Compiler.java:678)
>         at
> com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:636)
>         at
> com.google.javascript.jscomp.Compiler.access$000(Compiler.java:70)
>         at com.google.javascript.jscomp.Compiler$1.call(Compiler.java:559)
>         at com.google.javascript.jscomp.Compiler$1.call(Compiler.java:556)
>         at com.google.javascript.jscomp.Compiler$2.run(Compiler.java:601)
>         ... 1 more
> Caused by:
> com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideExceptio n:
> module$test
>         at
> com.google.javascript.jscomp.deps.SortedDependencies.getInputProviding(Sort edDependencies.java:120)
>         at
> com.google.javascript.jscomp.JSModuleGraph.manageDependencies(JSModuleGraph .java:325)
>         at
> com.google.javascript.jscomp.Compiler.processAMDAndCommonJSModules(Compiler .java:1389)
>         ... 8 more
> [error]
> {file:/D:/Dropbox/Dev/HomeHerld/ScalaWorkspace/test_app/}test_app/*:play-co py-assets:
> PlayException: Compilation error [Internal Closure Compi
> ler error (see logs)]
> [error] application -
>
> ! Internal server error, for request [GET /] ->
>
> sbt.PlayExceptions$AssetCompilationException: Compilation error [Internal
> Closure Compiler error (see logs)]
>         at
> play.core.jscompile.JavascriptCompiler$.compile(JavascriptCompiler.scala:53 )
> ~[na:na]
>         at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
> ~[na:na]
>         at sbt.PlayCommands$$anonfun$36.apply(PlayCommands.scala:417)
> ~[na:na]
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.s cala:378)
> ~[na:na]
>         at
> sbt.PlayCommands$$anonfun$AssetsCompiler$1$$anonfun$30.apply(PlayCommands.s cala:376)
> ~[na:na]
>         at
> scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.s cala:200)

Ben McCann

unread,
Mar 29, 2012, 5:50:52 PM3/29/12
to play-fr...@googlegroups.com
Hey guys,
Is this still broken for you with the latest version from git?  The Closure Compiler version was upgraded, so this may be fixed now.

-Ben


Suchema Oyetey

unread,
Apr 2, 2012, 7:33:57 AM4/2/12
to play-fr...@googlegroups.com
This still doesn't look to be working for me, still getting the same issue as before, even with the update.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Eishay Smith

unread,
Apr 10, 2012, 2:59:46 PM4/10/12
to play-fr...@googlegroups.com
Agree that using closure's requiers is useless if it works only on the minified files. 
I recommend that until the issue is fixed "CommonJS-style dependencies" should be removed from the documentation or clearly specified that its not going to work unless you minify the files.
Its very frustrating to go through the setup and discovering the bitter truth. 

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.

Eric Jain

unread,
Apr 25, 2012, 5:58:10 AM4/25/12
to play-framework
On Mar 29, 2:50 pm, Ben McCann <b...@benmccann.com> wrote:
> Hey guys,
> Is this still broken for you with the latest version from git?  The Closure
> Compiler version was upgraded, so this may be fixed now.https://play.lighthouseapp.com/projects/82401-play-20/tickets/274-clo...https://github.com/playframework/Play20/commit/cf84b0a2453dfb2796a339...

Just built and tested the trunk on Windows, doesn't work for me,
either (same error as before).

Kadir Doğan

unread,
Apr 25, 2012, 9:24:11 AM4/25/12
to play-fr...@googlegroups.com
Hi, @eric and everybody,

neither i do.

i cloned Play20 from github and compile it but it does not work for me too

my operation system windows 7 (64 bit edition) 

Ben McCann

unread,
Apr 25, 2012, 11:21:05 AM4/25/12
to play-fr...@googlegroups.com
You should make sure the bug gets reopened (or file a new one and add it to this thread)


2012/4/25 Kadir Doğan <kadir....@gmail.com>

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/cb6eEjN34KsJ.

Nico

unread,
May 2, 2012, 4:04:01 PM5/2/12
to play-fr...@googlegroups.com
Just tested on Windows 7 with the official 2.0.1, and it is still broken with a very simple JS :( 

I updated the bug :

Guillaume Bort

unread,
May 2, 2012, 4:23:46 PM5/2/12
to play-fr...@googlegroups.com, play-fr...@googlegroups.com
Yes because google closure compiler itself is broken on windows. 
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/mY-jdvtQdqUJ.

Eric Jain

unread,
May 2, 2012, 5:19:19 PM5/2/12
to play-fr...@googlegroups.com
On Wed, May 2, 2012 at 1:23 PM, Guillaume Bort <guillau...@gmail.com> wrote:
> Yes because google closure compiler itself is broken on windows.

What exactly is broken?

I can download http://closure-compiler.googlecode.com/files/compiler-latest.zip
and run e.g. `java -jar compiler.jar --js=app.js --js=util.js
--js_output_file=app.min.js` on Windows 7, and there is no mention of
a Windows-specific issue at
http://code.google.com/p/closure-compiler/issues/list/.

Ben McCann

unread,
May 2, 2012, 6:17:37 PM5/2/12
to play-fr...@googlegroups.com
I'm guessing the bug is in --process_common_js_modules since that's fairly new and untested and Play uses it.  However, I see this recently closed bug, so I'm guessing that just updating to the next version when it's released will fix the bug.  There was a build cut 2 days ago, but I guess this bug fix missed the cut-off.  Though I know there was another bug fix that went in for the Play framework and was included in this version, so it might not be bad to update anyway.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.

Ankit Dhingra

unread,
Jun 28, 2012, 12:42:37 AM6/28/12
to play-fr...@googlegroups.com
This ticket suggests that the google closure compiler is still broken for windows, hence the problem exists in 2.0.2 as well.
Is there anyway we can disable the closure plugin?


On Wednesday, 11 April 2012 00:29:46 UTC+5:30, Eishay wrote:
Agree that using closure's requiers is useless if it works only on the minified files. 
I recommend that until the issue is fixed "CommonJS-style dependencies" should be removed from the documentation or clearly specified that its not going to work unless you minify the files.
Its very frustrating to go through the setup and discovering the bitter truth. 

On Wed, Mar 21, 2012 at 2:34 PM, rssh <ruslan.s....@gmail.com> wrote:

 For now require in js works only when we use minimized result file.
(see  https://play.lighthouseapp.com/projects/82401/tickets/193-javascript-require-support-in-non-minimized-files
)


On Mar 19, 12:34 am, Simon <simons.m...@gmail.com> wrote:
> Hi,
>
> I have been following this page in the wiki:
>
> https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler
>
> I create lib.js and test.js in the app/assets/javascripts folder and no
> matter what I do I get "Internal Closure Compiler error (see logs)" and it
> points to line 0
>
> Has anyone followed the instructions in the wiki page above? I cant get it
> to work no matter what I do.
>
> Thanks,
> Simon

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

Ben McCann

unread,
Jun 28, 2012, 1:18:04 AM6/28/12
to play-fr...@googlegroups.com
Just put the JS in public/ instead of app/ and it won't be compiled.  I'm pretty sure you can disable it in your build file too (IIRC you have to override resourceGenerators), but that's a lot harder since SBT is pretty tricky.  The next Closure Compiler release will fix things on Windows and I imagine that will happen pretty soon.


To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/mVcBmnTLHgkJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages