automatic indent and clean up of js code?

Discussion in 'Javascript' started by ivanhoe, May 21, 2004.

  1. ivanhoe

    ivanhoe Guest

    I need something like html tidy, but for javascript...to fix code
    indentation, converts tab/spaces, removes white space, etc...maybe even fast
    check sintax and warn on compatibility issues, but I guess it's too much to
    ask (?!)

    if you have positive expirience with some application(or perl/php script)
    that knows how to properly do this (and is customizible and maybe also free
    or at least cheap?), please speak up, since all progs I tried so far were
    (very) far from perfect...


    thanx in advance,
    ivan
     
    ivanhoe, May 21, 2004
    #1
    1. Advertising

  2. ivanhoe

    Ivo Guest

    "ivanhoe" <> wrote in message
    news:c8jp1f$uta$...
    > I need something like html tidy, but for javascript...to fix code
    > indentation, converts tab/spaces, removes white space, etc...maybe even

    fast
    > check sintax and warn on compatibility issues, but I guess it's too much

    to
    > ask (?!)


    jslint, a 'script validator':
    <URL: http://www.crockford.com/javascript/lint.html>

    > if you have positive expirience with some application(or perl/php script)
    > that knows how to properly do this (and is customizible and maybe also

    free
    > or at least cheap?), please speak up, since all progs I tried so far were
    > (very) far from perfect...


    That is why you will write your own.
    <URL: http://4umi.com/web/bookmarklet/edit.htm > (not compatible)

    > thanx in advance,
    > ivan


    H
    Ivo
     
    Ivo, May 21, 2004
    #2
    1. Advertising

  3. ivanhoe

    Jim Ley Guest

    On Fri, 21 May 2004 03:04:36 +0200, "ivanhoe" <> wrote:

    >I need something like html tidy, but for javascript...to fix code
    >indentation, converts tab/spaces, removes white space, etc...maybe even fast
    >check sintax and warn on compatibility issues, but I guess it's too much to
    >ask (?!)


    astyle (in addition to the lint you've already been told about.)

    both free of course.

    Jim.
    --
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Jim Ley, May 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    792
    Guest
    Jun 29, 2004
  2. dt
    Replies:
    4
    Views:
    528
    CBFalconer
    Dec 31, 2006
  3. Replies:
    8
    Views:
    544
  4. Peng Yu
    Replies:
    0
    Views:
    142
    Peng Yu
    Mar 17, 2013
  5. Rodrick Brown
    Replies:
    0
    Views:
    128
    Rodrick Brown
    Mar 17, 2013
Loading...

Share This Page