JavaScript Build Process

Discussion in 'Javascript' started by timothytoe, Mar 5, 2008.

  1. timothytoe

    timothytoe Guest

    I've been writing PHP scripts to automate my build process for
    deployment. I'm not very happy with the result.

    There must be proper tools for this. I've seen discussions of Ant.
    Would that work for me, or is there something more suitable for a
    JavaScript programmer?

    Some things I might do are search js files to make sure there are no
    more console.log calls, concatenate files. Call optimizers for CSS,
    HTML, use gzip.

    I know this is not a language question, per se, but I wasn't sure
    where else I could ask so many JavaScript programmers how this is
    typically handled.
    timothytoe, Mar 5, 2008
    #1
    1. Advertising

  2. timothytoe

    Krukow Guest

    On 5 Mar., 19:48, timothytoe <> wrote:
    > There must be proper tools for this. I've seen discussions of Ant.
    > Would that work for me, or is there something more suitable for a
    > JavaScript programmer?
    >
    > Some things I might do are search js files to make sure there are no
    > more console.log calls, concatenate files. Call optimizers for CSS,
    > HTML, use gzip.


    Hello,

    I will be writing on my blog http://higher-order.blogspot.com about
    this quite topic soon. The article will be part of a series about
    developing large client/server applications with the client running in
    the browser (i.e., written in JavaScript) [actually I'm hoping some of
    the gurus in this group will have a read keep me sharp ;-)].

    Anyway, hope you will read the above once it is ready. Until then (and
    to answer your question!) Julien Lecomte who used to work for Yahoo!
    (where he developed the YUICompressor) has some great blog postings
    about this topic (he has an example ant build.xml file):
    http://www.julienlecomte.net/blog/2007/09/16/

    If you combine his approach with say JSLint (perhaps modified to check
    for your specific issues), you should have a pretty solid build
    process. Next is automated testing... :)

    Cheers,
    - Karl
    Krukow, Mar 5, 2008
    #2
    1. Advertising

  3. timothytoe

    dhtml Guest

    On Mar 5, 10:48 am, timothytoe <> wrote:
    > I've been writing PHP scripts to automate my build process for
    > deployment. I'm not very happy with the result.
    >


    PHP isn't much fun.

    > There must be proper tools for this. I've seen discussions of Ant.
    > Would that work for me, or is there something more suitable for a
    > JavaScript programmer?
    >


    I've done a quick write-up on the APE build process:
    http://dhtmlkitchen.com/ape/build.html


    > Some things I might do are search js files to make sure there are no
    > more console.log calls, concatenate files. Call optimizers for CSS,
    > HTML, use gzip.
    >


    Stripping out console.log calls -- I should add an ant task for that.

    > I know this is not a language question, per se, but I wasn't sure
    > where else I could ask so many JavaScript programmers how this is
    > typically handled.


    The ANT user list is a good place to ask.
    dhtml, Mar 6, 2008
    #3
  4. timothytoe

    timothytoe Guest

    On Mar 5, 6:46 pm, dhtml <> wrote:
    > On Mar 5, 10:48 am, timothytoe <> wrote:
    >
    > > I've been writing PHP scripts to automate my build process for
    > > deployment. I'm not very happy with the result.

    >
    > PHP isn't much fun.
    >
    > > There must be proper tools for this. I've seen discussions of Ant.
    > > Would that work for me, or is there something more suitable for a
    > > JavaScript programmer?

    >
    > I've done a quick write-up on the APE build process:http://dhtmlkitchen.com/ape/build.html
    >
    > > Some things I might do are search js files to make sure there are no
    > > more console.log calls, concatenate files. Call optimizers for CSS,
    > > HTML, use gzip.

    >
    > Stripping out console.log calls -- I should add an ant task for that.
    >
    > > I know this is not a language question, per se, but I wasn't sure
    > > where else I could ask so many JavaScript programmers how this is
    > > typically handled.

    >
    > The ANT user list is a good place to ask.


    Thanks Krukow and dhtml,

    Ant looks promising. When I get time, I'm going to learn Gant (http://
    gant.codehaus.org/). That'll give me a chance to learn Groovy as well
    as Ant.
    timothytoe, Mar 7, 2008
    #4
  5. dhtml wrote:
    > On Mar 5, 10:48 am, timothytoe <> wrote:
    >> I've been writing PHP scripts to automate my build process for
    >> deployment. I'm not very happy with the result.
    >>

    >
    > PHP isn't much fun.


    IBTD.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
    Thomas 'PointedEars' Lahn, Mar 7, 2008
    #5
  6. On Mar 5, 10:48 am, timothytoe <> wrote:
    > I've been writing PHP scripts to automate my build process for
    > deployment. I'm not very happy with the result.
    >
    > There must be proper tools for this. I've seen discussions of Ant.
    > Would that work for me, or is there something more suitable for a
    > JavaScript programmer?
    >
    > Some things I might do are search js files to make sure there are no
    > more console.log calls, concatenate files. Call optimizers for CSS,
    > HTML, use gzip.
    >
    > I know this is not a language question, per se, but I wasn't sure
    > where else I could ask so many JavaScript programmers how this is
    > typically handled.


    Creating a build process will only be a couple hundred lines of code
    and is specific to your situation. It may be very hard to find a
    prepackaged tool to do the job.

    I wrote a blog article about this recently

    <URL: http://peter.michaux.ca/article/7346>

    Peter


    Peter
    Peter Michaux, Mar 8, 2008
    #6
    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. Vagif Abilov
    Replies:
    2
    Views:
    559
    Vagif Abilov
    Jul 7, 2004
  2. Pedro Mir
    Replies:
    2
    Views:
    436
    Winista
    Jun 20, 2006
  3. Nicolas Lehuen
    Replies:
    3
    Views:
    712
    Nicolas Lehuen
    Jan 28, 2004
  4. Toon Knapen
    Replies:
    2
    Views:
    361
    Toon Knapen
    May 17, 2006
  5. Guest
    Replies:
    6
    Views:
    14,146
    Sravani
    May 19, 2012
Loading...

Share This Page