Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8812843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:41:51+00:00 2026-06-14T03:41:51+00:00

I found that some options in CompilerOption are not exported to the command line.

  • 0

I found that some options in CompilerOption are not exported to the command line.

For example, alias all strings is available in the Closure Compiler’s Java API CompilerOption but I have no idea how set this in the command line.

I know I can create a new java class, like:

Compiler c = new Compiler();
ComppilerOptions opt = new ComppilerOptions();
opt.setAliasAllString(true);

c.compile(.....);

However I have to handle the command line args myself.

Any simple idea?

============================

In order to try the alias all string option, I write a simple command line application based on compiler.jar.

However I found that, the result I got when open the alias all string is not what I expected.

For example:

a["prototype"]["say"]=function(){
  var a="something string";
}

Given the above code, the something string will be replaced by a variable like this:

var xx="something string";

....
var a=xx;
....

This is fine, but how about the string “say”? How does the closure compiler know this should be aliased(replace it use variable) or exported(export this method)?

This is the compiled code now:

a.prototype.say=function(){....}

It seems that it export it.

While I want this:

var a="prototype",b="say",c="something string";

xx[a][b]=function(){.....}

In fact, this is the google_map-like compilation.

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:41:52+00:00Added an answer on June 14, 2026 at 3:41 am

    Not all options are available from the command line – this includes aliasAllStrings. For some of them you have the following options:

    1. Build a custom version of the compiler
    2. Use the Java API (see example).
    3. Use plovr

    Getting the same level of compression and obfuscation as the Maps API requires code written specifically for the compiler. When properly written, you’ll see property and namespace collapsing, prototype aliasing and a whole host of others. For an example of the style of code that will optimize that way, take a look at the Closure Library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found that some result of MBRContains(g1,g2) and other functions seems not right to
I tried some work using http handler and found that we can not execute
In an app I'm profiling, I found that in some scenarios this function is
I've found recently that for some types of financial calculations that the following pattern
I found that you can't read from some sites using Python's urllib2(or urllib). An
I did some research and found that the only way to vertically center a
I read some XSLT examples and found that code: <xsl:apply-template select=@*|node()/> What does that
While doing some refactoring I've found that I'm quite often using a pair or
I have found that I often have to implement some sort of a scheduler
I've done some research and found that there apparently is an easy and understandable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.