RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

Notepad example in Google Closure rep does not compile when using ADVANCED compilation mode #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Copy the Notepad.js example from 
http://code.google.com/closure/library/docs/tutorial.html
2. Make config.js file containing:
{
  "comment": "This config file is used to test plovr and notepad",
  "id": "integration-test",
  "deps": "",
  "inputs": "notepad.js"
}
3. Edit notepad.html, removing the normal closure scripts, adding the "<script 
src="http://localhost:9810/config?id=integration-test"></script>"

* All files to run it are attached. Just check path to Plovr.jar

What is the expected output? What do you see instead?
It works for SIMPLE; but not for ADVANCED.

What version of the product are you using? On what operating system?
Latest with Raw

Please provide any additional information below.
I dont know enough about the code yet to comment.

Original issue reported on code.google.com by ged...@gmail.com on 12 Jun 2010 at 2:18

Attachments:

GoogleCodeExporter commented 8 years ago
I think it's a problem of Closure or the demo, not a bug of the plovr.
Could you file a bug for Closure?

Original comment by morr...@gmail.com on 3 Oct 2010 at 3:02

GoogleCodeExporter commented 8 years ago
The notepad.js example you mention is missing a

goog.exportSymbol('tutorial.notepad.makeNotes', tutorial.notepad.makeNotes);

What happens is that tutorial.notepad.makeNotes gets renamed to something else 
in advanced mode, so you can't use it directly in the html page, without it 
being part of the exported API.

If you add that line to the end of notepad.js, you should find that your test 
starts working in advanced mode.

I don't believe that this is a shortcoming of plovr, but rather a side-effect 
of dealing with advanced mode variable renaming.

Original comment by ibmirkin@gmail.com on 5 Dec 2010 at 11:45