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 3459306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:05:25+00:00 2026-05-18T10:05:25+00:00

I have manage to create a small size js application that uses jQuery and

  • 0

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 if somebody can confirm that this idea also works for bigger and more complex apps.

The procedure is as follows:

0.- You have an html file that calls jquery-1.4.3.min.js, test1.js, and test2.js

1.- compile your app and export a property map file

java -jar closure-compiler.jar \
       --compilation_level ADVANCED_OPTIMIZATIONS \
       --js test1.js --js test2.js \
       --property_map_output_file prop.out > min.js

The property map is a key/value file that contains the name of the property before and after compilation:

aprop:a
html:b
each:c

2.- Copy prop.out to prop.in and edit it so that jQuery properties (functions) are replaced by the same name (this could be easily automated with a list jquery’s function):

aprop:a
html:html
each:each

3.- Recompile using prop in as property map input

java -jar closure-compiler.jar \
       --compilation_level ADVANCED_OPTIMIZATIONS \
       --js test1.js --js test2.js \
       --property_map_input_file prop.in > min.js

4.- Now in your html, include min.js and jquery-1.4.3.min.js. The application should be functional but your code should be faster and smaller.

This will minify your code, not jquery’s.

As I said, I have tested this in a small app. If somebody has a bigger and complex app, it would be nice to know that this works.

Thanks,

heg

  • 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-05-18T10:05:25+00:00Added an answer on May 18, 2026 at 10:05 am

    Have you considered using externs. As far as I know that is the way to go to keep the jQuery methods from being shortened in your code. Externs for jQuery exist as contributions to the closure project.

    For jQuery UI you might want to try this. It is something I came across once but haven’t tested it myself

    BTW: If you’re interested, there is this extremely handy build tool for closure: Plovr. I use it all the time and I made externs work with it.

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

Sidebar

Related Questions

Good day I have manage to create my small and simple application, work with
My knowledge of regex is very weak. So far I have manage to create
I have tried FBConnect for iPhone and am able to create/manage sessions and upload
I have managed to create a custom action in C# using MakeSfxCA which is
I have created a class that will manage connection and commands, I named it
I have an Application (an appointment manager) which lets the user create usercontrols in
Good day, I have created an object that will manage data access. My app
Hi am writing small app for posting twitts on twitter.com I manage to create
I have created a method that can be called using a stored procedure name
I have a small question. I'm trying to create templates for getters for my

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.