JavaScript Build Process

T

timothytoe

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.
 
K

Krukow

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
 
D

dhtml

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.
 
T

timothytoe

PHP isn't much fun.


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


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


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.
 
P

Peter Michaux

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top