Questions tagged [plovr]

plovr is a build tool that dynamically recompiles JavaScript and Closure Template code. It is designed to simplify Closure development.

The intended usage of plovr is as follows:

During development, you should be able to edit JavaScript and Soy files in your favorite text editor, refresh your web application in the browser, and have it load a newly compiled version of your code. Any errors or warnings resulting from compilation by the Closure Compiler should appear at the top of your web application so you can identify and fix them quickly.

During production, you should serve precompiled versions of your JavaScript that behave exactly as they did during development.

In providing a build tool to assist in iterative JavaScript development, plovr also achieves the following:

  • Replaces the set of unrelated scripts that are usually required to build Closure code with a single JSON configuration file.
  • Exposes features of the Closure Compiler through the configuration file that were previously accessible only by writing Java code against the Compiler's API.
  • Facilitates the process of splitting JavaScript code into modules that can be downloaded separately, thereby reducing start-up time for web applications.

(Taken from the Plovr homepage: http://plovr.com/)

25 questions
9
votes
2 answers

getting started with Google Closure if you don't care about minifying/compiling?

If you don't care about minifying your code, is there a way to get started using the Google Closure library without having to set up a subversion client and use the compiler? The Notepad sample program on Google's website refers to
Tim
  • 429
  • 6
  • 19
6
votes
3 answers

Http-Method changes from POST to OPTIONS when changing Content-Type

I am using closure library to do a simple POST. I think XhrIo should work because from my machine when I use any other rest client ,like Firefox browser app RESTClient or Chrome's Simple Rest Client , I can make POST request to the server and…
Eddie
  • 125
  • 1
  • 2
  • 8
5
votes
1 answer

Closure compiler app using jquery

I have manage to create a small size js application that uses jQuery and jQuery UI using google's closure compiler with advanced optimizations. Just for clarity: I have not compiled jQuery itself, just my app that uses jquery. I would like to know…
Hernan
  • 5,811
  • 10
  • 51
  • 86
3
votes
2 answers

Is it possible to create objects within Closure templates?

I've just started doing some work with Google Closure, and I'd like to move the creation of select fields into its own template, and call into that template with something like: {call templates.utils.select} {param name: 'state'/} {param value:…
Cebjyre
  • 6,552
  • 3
  • 32
  • 57
3
votes
2 answers

Using Plovr to compile modules

I am trying to compile my JavaScript files using Plovr as defined in the config file below: { "id": "hello_demo", "paths": ".", "closure-library": "closure-library/closure/goog/", "mode": "ADVANCED", "level": "DEFAULT", "pretty-print":…
Chris
  • 816
  • 4
  • 11
  • 23
3
votes
1 answer

Auto rebuild closure soy templates

I faced a problem while using Google Closure Soy templates. When I change a template I need to run a script from command line to compile Soy template to JS file. Is there a service or something else to rebuild these templates automatically? Also,…
2
votes
2 answers

Why a JSC_MISSING_PROVIDE_ERROR in "Hello World" plovr example?

I'm trying to get started with plovr using the simple "Hello World" example in Closure: The Definitive Guide by Michael Bolin. But my build produces an error. Can anyone out there enlighten me as to my mistake? Here is my file…
jwfearn
  • 28,781
  • 28
  • 95
  • 122
2
votes
1 answer

Where is goog.ui.menuBar provided?

I am learning how to make a menu bar using Google Closure libraries via this example. http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/menubar.html However, when I try out the code in my own application, the Plovr compiler…
dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
2
votes
1 answer

goog.net.xhrio.send not calling the server

I am calling goog.net.XhrIo from within this onclick event goog.events.listen(invBtn, goog.ui.Component.EventType.ACTION, function(e) { goog.net.XhrIo.sent('http://remotehost.com:8080/customer/add'); (update :typo here send instead of…
Eddie
  • 125
  • 1
  • 2
  • 8
1
vote
1 answer

How can I create my own custom functions for Closure templates in Plovr

I'm using Plovr and would like to use my own custom function (specifically a ucfirst function) inside templates. At the moment I'm only interested in rendering the templates as javascript, and since this is a fairly simple case I think actually…
Cebjyre
  • 6,552
  • 3
  • 32
  • 57
1
vote
2 answers

Does plovr support the latest closure library?

I was using plovr as closure compiler for the latest google closure library, but it think it plays nicely. Why is this so? Link=http://plovr.com/docs.html Thanks in advance for the help, Kiran
1
vote
1 answer

can plovr build tool use an external closure compiler?

The closure compiler in plovr.jar is older than the latest closure compiler. Is it possible to use the latest closure compiler jar ball with plovr?
Map X
  • 444
  • 1
  • 4
  • 14
1
vote
2 answers

How to make a plugin for Google Closure

I am currently using Closure/Plovr advanced mode to compile javascript. I want to add some custom functionality, such as string replacements and variable renaming. The important thing is that it requires parsed syntax. Is it possible to add this…
ColBeseder
  • 3,579
  • 3
  • 28
  • 45
1
vote
1 answer

Run javascript at plovr compile-time

Is it possible to run javascript at compile time using plovr? (perhaps defining a variable in the config file). For example, I would like a function that returns the time the script was compiled, something like this: function compiledAt(){ …
ColBeseder
  • 3,579
  • 3
  • 28
  • 45
1
vote
3 answers

Getting Closure / Plovr to remove functions from an if that is always false

An if statement that is obviously always false, eg. if (false), closure removes the statement. My code looks like this: if (settings.lang === "en"){ lib.doSomething(); } settings.lang is a constant. /** * @type {string} * @const */…
ColBeseder
  • 3,579
  • 3
  • 28
  • 45
1
2