Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   JavaScript Build Process (http://www.velocityreviews.com/forums/t934982-javascript-build-process.html)

timothytoe 03-05-2008 06:48 PM

JavaScript Build Process
 
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.

Krukow 03-05-2008 07:36 PM

Re: JavaScript Build Process
 
On 5 Mar., 19:48, timothytoe <timothy...@gmail.com> 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

dhtml 03-06-2008 02:46 AM

Re: JavaScript Build Process
 
On Mar 5, 10:48 am, timothytoe <timothy...@gmail.com> 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.



timothytoe 03-07-2008 07:22 PM

Re: JavaScript Build Process
 
On Mar 5, 6:46 pm, dhtml <dhtmlkitc...@gmail.com> wrote:
> On Mar 5, 10:48 am, timothytoe <timothy...@gmail.com> 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.

Thomas 'PointedEars' Lahn 03-07-2008 09:38 PM

Re: JavaScript Build Process
 
dhtml wrote:
> On Mar 5, 10:48 am, timothytoe <timothy...@gmail.com> 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>

Peter Michaux 03-08-2008 05:23 AM

Re: JavaScript Build Process
 
On Mar 5, 10:48 am, timothytoe <timothy...@gmail.com> 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


All times are GMT. The time now is 07:38 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.