multiple files interrelated

15 views
Skip to first unread message

Javismiles

unread,
Feb 16, 2014, 1:01:52 AM2/16/14
to ugli...@googlegroups.com
i am trying your UglifyJS2 which is great (I used to use YUI in the past)
i have a couple of doubts, maybe you can help me, 

a) my main issue is that in my web app i have multiple JS files, that call each other, and reference each other. I cannot merge them into a single file, for many reasons, it just wouldnt work; so my concern is, if there are variables , function names and variables that are common to different JS files and are being called from multiple JS files, how can i get obfuscation that changes those names to the same new name across all the JS files? 
lets say there is a function called wonderfulfunction() , that is being called from 3 different files, and lets say the obfuscation changes "wonderfulfunction"  to "sF" for example, will i get wonderfulfunction always switched to "sF" everywhere in all the files? 
so you get what my concern is, with 1 file all is clear, but with many files calling each other, will the changes in name work? and thats what i mainly want, changes in name to obscure the logic

- and how can i run the command line to obfuscate at once different files and produce their output not in a single output file but each on its own obfuscated version?
and  being consistent in the changes of names of variables across all the files?
and how do i activate changing of names of variables and functions? so far in my tests i haven't seen the names changing

so if i have 10 files which reference each other, with function and variable names that appear in many of them referring to the same entity,
how can i obfuscate those 10 files at once, keeping them as separate files,
applying name changing to the variables and functions and keeping that renaming consistent across the files?

thank you soooo very much for any information
best :)
Reply all
Reply to author
Forward
0 new messages