SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Cool tool

  1. #1
    SitePoint Addict Drinky's Avatar
    Join Date
    Jan 2001
    Location
    England
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After you have spent hours crafting your mamoth javascript app, with all of that lovely formatting and whitespace the file size can be quite large.

    Found this tool called the crunchinator on brainjar.com
    http://www.brainjar.com/js/crunch/demo.html

    it optimizes javascript source...
    Drinky

  2. #2
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The crunchinator is quite cool; however before you optimise your source code, make sure you've added semi-colons to the end of each line so that your code doesn't get messed up and you get 6 million JScript errors coming out at you.

    I find that after using the crunchinator you'll often need to add some semi-colons and braces back to ensure the code works.
    My 2 Cents (or is that 2.2 Cents including GST?)

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's only if you don't add them already. Thankfully I'm in the habit of doing so.

    Yes, this looks ugly:

    Code:
    if (something < something2) { document.write(...); }
    ...but hey, it's totally correct, and I'll never run into any problems.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •