google-closure

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

柔情痞子 提交于 2019-12-18 07:29:13
问题 This question already has answers here : Import regular CSS file in SCSS file? (13 answers) Closed 4 years ago . 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

difference between “void 0 ” and “undefined”

倾然丶 夕夏残阳落幕 提交于 2019-12-17 04:47:58
问题 I'm using "Closure Compiler", when compiling my scripts I spend the following: Before compiling: // ==ClosureCompiler== // @compilation_level SIMPLE_OPTIMIZATIONS // @output_file_name default.js // @formatting pretty_print,print_input_delimiter // ==/ClosureCompiler== var myObj1 = (function() { var undefined; //<----- declare undefined this.test = function(value, arg1) { var exp = 0; arg1 = arg1 == undefined ? true : arg1; //<----- use declare undefined exp = (arg1) ? value * 5 : value * 10;

Whats the best JSON JavaScript polyfill

自古美人都是妖i 提交于 2019-12-13 21:40:45
问题 I am looking for a JSON polyfill (for JSON support in older browsers) that I can use in some JavaScript I'm writing. I've looked and found JSON2 and JSON3 are quite popular and I've read that JSON3 is meant to be a drop in replacement for JSON2 but I was wondering if these are the best polyfills out there? The only problem I have with JSON3 is that when I run the google closure lint checks over the JSON3 library it complains about for loops not defining a body: If this if/for/while really

Closure: --namespace Foo does not include Foo.Bar, and related issues

空扰寡人 提交于 2019-12-13 04:34:47
问题 I have a rather big library with a significant set of APIs that I need to expose. In fact, I'd like to expose the whole thing. There is a lot of namespacing going on, like: FooLibrary.Bar FooLibrary.Qux.Rumps FooLibrary.Qux.Scrooge .. Basically, what I would like to do is make sure that the user can access that whole namespace. I have had a whole bunch of trouble with this, and I'm totally new to closure, so I thought I'd ask for some input. First, I need closurebuilder.py to send the full

Activate a combobox from a checkbox using google closure

五迷三道 提交于 2019-12-13 04:22:31
问题 I have a set of check boxes with Id's user1,user2 and so on and also set of combo boxes with Id's usersel1,usersel2 and so on in a dialog. When a check box is checked (say suppose with Id user1) then corresponding combo box must be activated(i.e combo box with Id usersel1). I have the following code and isn't working. How do i achieve this behavior? for(var g=0;g<userlist.length;g++) //userlist.length give no of users b2 = (goog.dom.getElement('usersel'+(g+1))); //gets combo box //listening

Bad type annotation. Unknown type

最后都变了- 提交于 2019-12-12 04:58:27
问题 I keep getting the warning mentioned above but can't figure out why. I've added deps.js and deps.js contains a reference to the type. Here is the offending code: goog.provide("MyCompany.MyApp.dom"); MyCompany.MyApp.dom.getArticleAmountInput_=function(){ return document.getElementById("articleAmount"); }; /** * Gets the article amount input value * @type {function(this:MyCompany.MyApp.dom):number} */ MyCompany.MyApp.dom.getArticleAmount=function(){ var tmp=this.getArticleAmountInput_(); return

limejs int step installation issue with closure

笑着哭i 提交于 2019-12-12 03:27:27
问题 I already has gitbash on windows 7. I installed Python, also added Environment path to C:/python33 After cloning limejs. When type the 3rd step from limejs basics. https://github.com/digitalfruit/limejs I get following error. Welcome to Git (version 1.8.3-preview20130601) Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. lenovo@BMI-AJINKYA /d/limejs (master) $ python --version Python 3.3.2 lenovo@BMI-AJINKYA /d/limejs (master) $

CompilerOptions: NoSuchMethodError: com.google.common.base.Preconditions.checkArgument

纵饮孤独 提交于 2019-12-11 09:49:57
问题 Anybody got any Idea why this error appears? Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(Z)V at com.google.common.collect.Lists.computeArrayListCapacity(Lists.java:105) at com.google.common.collect.Lists.newArrayList(Lists.java:98) at com.google.javascript.jscomp.ComposeWarningsGuard.<init> (ComposeWarningsGuard.java:83) at com.google.javascript.jscomp.CompilerOptions.<init>(CompilerOptions.java:791) Code import java.io.File;

How do I tell the closure compiler to ignore code?

走远了吗. 提交于 2019-12-11 07:45:29
问题 I decided I needed something to help me a bit while implementing interfaces. So I added this function to the base.js file in the closure library. /** * Throws an error if the contructor does not implement all the methods from * the interface constructor. * * @param {Function} ctor Child class. * @param {Function} interfaceCtor class. */ goog.implements = function (ctor, interfaceCtor) { if (! (ctor && interfaceCtor)) throw "Constructor not supplied, are you missing a require?"; window

Google Closure Advanced | Object property not recognized | Dynamic Properties?

纵然是瞬间 提交于 2019-12-11 06:27:47
问题 Actual Error Code JSC_INEXISTENT_PROPERTY Summary I get this error for the code listed and commented below. I make the call like this. o_p.page holds user input and one of the properties is indeed tag Mo.AppBAdder.image_element = vDomBMAdd(o_p.page); o_p.page is populated by calling the object which hold user input like this: o_p.page = text_object.getArray(); Is there a way I can do this so Google Closure does not feel the property does not exist? Setting options is O.K. Also, I don't mind