Latest post 11-02-2009 5:56 by HeavenCore. 1 replies.
  • 03-02-2009 0:25

    How can i quickly add semi-colons in function declarations in large js file?

     There are lots of functions, how can i quickly add semi-colons to it?

  • 11-02-2009 5:56 In reply to

    • HeavenCore
    • Top 50 Contributor
      Male
    • Joined on 11-02-2009
    • Bolton, England
    • Posts 1

    Re: How can i quickly add semi-colons in function declarations in large js file?

    There are a few automated tools that will add semi-colons for you (YUI Compressor etc), however, these are usually considered 'risky' to rely on. A much better approach is to stick your code into http://www.jslint.com/ which will report exactly where semi-colons are missing, just spend some time correcting the semi-colon errors and go from there.

    Also, see this thread, I have never had trouble with missing the semicolon after the closing } on a function, basically if JSLint says its OK, its always compressed and worked (fingers crossed)

    Good luck!

     

Page 1 of 1 (2 items) | RSS