Alex Rivera | Logout

What do you do to your JavaScript code before deployment?

Asked 2009-06-04T18:55:47.480
16

Do you have a step in your deployment process that minifies JS? Do you have any sort of preprocessor for your JavaScript that allows you to leave in comments and console.logs and then have them automatically stripped out? Is your JavaScript machine generated by GWT or Script#? Do you use ANT or another tool to automate deployment?

I see a lot of JavaScript that looks like it comes right out of the editor, complete with lots of white space and comments. How much of that is due to not caring about the state of the deployed code, and how much is due to the spirit of the open web?

Edit
Report

2 Answers

1

I have a PHP script that does it on the server side and keeps a cache of whatever it pulls from the source folder(s).

answered 2009-06-05T03:07:46.237
0

I thought I would share my approach to js deployments. Have a look at this blog post: http://www.picnet.com.au/blogs/Guido/post/2009/12/10/Javascript-runtime-compilation-using-AspNet-and-Googles-Closure-Compiler.aspx

This also includes code to compile (using google's closure compiler) at runtime (when needed).

Thanks Guido

answered 2009-12-10T03:10:54.833

Your Answer