google-closure

Using Google Closure compiler [duplicate]

你说的曾经没有我的故事 提交于 2019-11-29 20:05:35
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: jQuery compiled with Google Closure Compiler I am using jQuery and I have all of my JS code in application.js file. When I compile "application.js" with the Google Closure compiler (using the advance options) I get a js file with no errors and warning. However, I am unable to use the file in my page, I get an error on page load which says "TypeError: Result of expression '$("div.tile").d' [undefined] is not a

What does Google Closure Library offer over jQuery? [closed]

放肆的年华 提交于 2019-11-29 18:33:50
Considering business background community support available extensions default set of features simplicity of use and reliability why do you prefer one over the another? Wookai I'll try to add my piece of information. More than another JS lib As I understand it, Google Closure is not only another JS library, but it is also a set of tools that will allow you to optimize your JS code. Working with jQuery gives you good tools and a lightweight library, but it does not minify your own code. The Closure compiler will. The closure inspector may also be useful, as sometimes minified code has a

How to merge .CSS files with Sass (or other tool)? [duplicate]

China☆狼群 提交于 2019-11-29 13:23:37
This question already has an answer here: Import regular CSS file in SCSS file? 13 answers I can use Sass to compile multiple .SCSS or .SASS input files into a single .CSS output file using @import as described here . If I use @import to include normal .CSS files, they are not merged. The output .CSS file still contains the @import directives. That makes sense. But is there a way I can override this behavior, perhaps a command-line switch to the Sass compiler? In other words, can I tell Sass to attempt to forcibly merge @import "foo.css"; just as if it were a .SCSS file? I'm using a third

Internet Explorer, Closure Compiler and Trailing Commas

蓝咒 提交于 2019-11-29 10:52:26
I'm using html5boilerplate build script and when minifying the scripts (which uses Google Closure Compiler) I'm getting this error -js.all.minify: [echo] Minifying scripts [copy] Copying 3 files to /Users/Username/Desktop/Web/intermediate/js [apply] /Users/Juan/Desktop/Web/js/plugins.js:117: ERROR - Parse error. Internet Explorer has a non-standard intepretation of trailing commas. Arrays will have the wrong length and objects will not parse at all. [apply] }, { duration: 727 }) [apply] ^ But the code DOES work in IE 8 if run uncompiled. This is the code anim1.animate({ 'left': '+=32px',

How can I load my own js module with goog.provide and goog.require?

倾然丶 夕夏残阳落幕 提交于 2019-11-29 07:24:50
问题 We are trying to switch the packaging for our project from dojo to google closure, but we haven't had any luck so far. Here is a simple example that illustrates what we are trying to accomplish: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="runtime/src/core/lib/goog-rev26/base.js"></script> <script> goog.require("foo.bar"); function main() {foo.bar.echo("hello world")} </script> </head> <body onload="main()"> </body> </html> Then in /foo/bar.js I have:

Jquery vs Google Closure va GWT Pros & cons for large web application development

二次信任 提交于 2019-11-29 06:53:53
问题 I am about to start developing a large web application.Which contains media(video,audio & images) and a large user base. The traffic on website may also goes very high. So here i am a little bit confused the should i use jquery/jquery ui or Google closure or GWT. i am familiar with jquery and i worked a lot into that but for GWT & Google Closure this is my first time. I am also comfortable in java so i can use GWT but i already mentioned the it's my first time with GWT. so please suggest me

How to host the google libphonenumber locally?

廉价感情. 提交于 2019-11-29 00:55:12
问题 During development on my localhost, I am trying to self host the libphonenumber library. I am trying with the following: <script src="//closure-library.googlecode.com/svn/trunk/closure/goog/base.js"></script> <script>goog.require('goog.proto2.Message');</script> <script src="scripts/vendor/pn/phonemetadata.pb.js"></script> <script src="scripts/vendor/pn/phonenumber.pb.js"></script> <script src="scripts/vendor/pn/metadata.js"></script> <script src="scripts/vendor/pn/phonenumberutil.js"><

Is it possible to use Closure Compiler ADVANCED_OPTIMIZATIONS with jQuery?

懵懂的女人 提交于 2019-11-28 19:58:09
I keep getting errors that the function (renamed) does not exist for the given object. Is there a release or setting or something to make it work? You have to declare jQuery as an extern to the compiler ...however I'm not sure if anyone's made one, there was an extern file for 1.3.2 , but I haven't seen any 1.4+ versions. Edit: this issue thread here has the community building a 1.4 version . You must use an externs file for jQuery when using Closure Compiler Advanced Mode with jQuery. Extern file will tell compiler these are reserved methods and accept these argument and argument data types

Is there a way to generate Javascript API documentation like the Google Closure Library API Documentation?

左心房为你撑大大i 提交于 2019-11-28 17:11:05
问题 I'm trying to find a tool that generates HTML documentation for my Javascript source code. Does anyone know if the tool that Google uses to generate the interface at the following URLs is open source? Would I be able to generate similar output? http://closure-library.googlecode.com/svn/docs/class_goog_proto2_Serializer.html http://closure-library.googlecode.com/svn/docs/namespace_goog_date.html http://closure-library.googlecode.com/svn/docs/namespace_goog_events.html http://closure-library

Google Closure minifier online?

落爺英雄遲暮 提交于 2019-11-28 15:46:00
问题 Has anyone setup an online copy/paste utility for Google's Closure minifier? I'm working on a project and I want to minify part of the code manually without having to setup the entire project on my own. 回答1: How about google's own service: http://closure-compiler.appspot.com/home I should point out that "setting up the entire project on my own" really is not half as scary as you make it out to be :p. I mean, it's a matter of downloading a java.jar and running it. Instructions: Download at