Connecting Tech Pros Worldwide Help | Site Map

JavaScript Build Process

  #1  
Old March 5th, 2008, 06:55 PM
timothytoe
Guest
 
Posts: n/a
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.
  #2  
Old March 6th, 2008, 02:55 AM
dhtml
Guest
 
Posts: n/a

re: JavaScript Build Process


On Mar 5, 10:48 am, timothytoe <timothy...@gmail.comwrote:
Quote:
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.
Quote:
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

Quote:
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.
Quote:
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.


  #3  
Old March 7th, 2008, 07:25 PM
timothytoe
Guest
 
Posts: n/a

re: JavaScript Build Process


On Mar 5, 6:46 pm, dhtml <dhtmlkitc...@gmail.comwrote:
Quote:
On Mar 5, 10:48 am, timothytoe <timothy...@gmail.comwrote:
>
Quote:
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.
>
Quote:
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
>
Quote:
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.
>
Quote:
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.
  #4  
Old March 8th, 2008, 05:25 AM
Peter Michaux
Guest
 
Posts: n/a

re: JavaScript Build Process


On Mar 5, 10:48 am, timothytoe <timothy...@gmail.comwrote:
Quote:
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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
new version of JavaScript minifier in Perl Peter Michaux answers 4 May 29th, 2007 10:05 PM
JavaScript code minimizer (not obfuscator!) Laurent Bugnion [MVP] answers 2 February 23rd, 2007 07:35 PM
JavaScript code minimizer (not obfuscator!) Laurent Bugnion [MVP] answers 0 February 23rd, 2007 05:05 PM
invisible javascript Mr. x answers 41 July 20th, 2005 01:49 PM