Desktop app for stripping comments from a group of files from onefolder and saving them in another

B

bizt

Hi,

I have an web app Im building and unlike the previous programmer, Ive
put lots and lots of comments through out the javascript so my fellow
collegues can understand how it works. Now, as much as Im pleased with
this when it comes to deploying the JS files onto the live server I
dont want my comments to be there as we do have competitors who might
benefit from knowing too easily how we go about doing some of the
stuff we do. Sounds petty I know but thats how it is.

Ive used a couple JS compressor tools before but they can be quite
time consuming when you have many JS files as I do. What Im hoping
does exist is a tool that you can tell it where you source files live
and it will strip comments, whitespace etc for each and then save them
to another folder. Does such magic exist? :) If not, what do you
recommend as a tool where you might want to perform this on a large
number of JS files and done every couple of days?

Cheers
Burnsy
 
E

Evertjan.

bizt wrote on 16 nov 2009 in comp.lang.javascript:
I have an web app Im building and unlike the previous programmer, Ive
put lots and lots of comments through out the javascript so my fellow
collegues can understand how it works. Now, as much as Im pleased with
this when it comes to deploying the JS files onto the live server I
dont want my comments to be there as we do have competitors who might
benefit from knowing too easily how we go about doing some of the
stuff we do. Sounds petty I know but thats how it is.

I think you overrate yourself by wanting to keep your work a secret.
If it is good enough to obfuscate, it is good enough to reengeneer.
Perhaps you should look at a compiled language programme.
Ive used a couple JS compressor tools before but they can be quite
time consuming when you have many JS files as I do. What Im hoping
does exist is a tool that you can tell it where you source files live
and it will strip comments, whitespace etc for each and then save them
to another folder. Does such magic exist? :) If not, what do you
recommend as a tool where you might want to perform this on a large
number of JS files and done every couple of days?

Compressing is not sensible in this time and age of cheap memory and fast
processors. If those are at a premium a scripting language should not be
your choice.

Getting rid of // comments is easy,
if you stick to put them on new lines.

Writing a little javascript programme for cscript or wscript, that does
away with all lines starting with // should by a thing you can do yourself.
 

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,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top