According to the docs, UglifyJS can mangle all property names except those on a provided reserved list. Is it possible to do it the other way, so only properties on provided list will be mangled?
If so, what options do I need to pass to uglify.minify(files, { ... })
?
One (ugly) command-line approach to achieve the kind of whitelist you're looking for might be to use the regex option.
UglifyJS2 Readme
Otherwise, there is an open issue which provides the code you could use to modify uglify yourself which achieves what I believe you're looking for.