Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Removing javascript comments

by cparker (Initiate)
on Apr 11, 2008 at 19:29 UTC ( [id://679827]=note: print w/replies, xml ) Need Help??


in reply to Removing javascript comments

John Crockford's JSMin removes comments as part of the minifcation process. There's a Perl implementation of JSMin at CPAN. You could study how this implementation removes comments and try to duplicate it. (Of course, if your license is compatible with Perl's license, you could just lift the relevant portions from the module, but then you wouldn't be learning anything. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://679827]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found