L
L
likejavascript2013-03-29 11:55:36
JavaScript
likejavascript, 2013-03-29 11:55:36

Using Google Closure Compiler in ADVANCED_MODE?

Hello. I want to use Google Closure Compiler to minify my JS in ADVANCED_MODE. As you know, this is a rather aggressive method of compression after which, if the code is "wrongly" organized and public properties are not exported, the code does not work at all.
Suppose I “correctly” built the class hierarchy, exported the methods that were needed outside of either, and even “quoted” all the names of the properties of simple objects
:
var settings = {prop: 1, prop: 2};

var settings = {"prop": 1, "prop": 2};

Otherwise, Closure will not spare them either. Well, if any extraneous utilities are used in the lib, then it turns into a song:
Lib["util"]["storage"]["clear"]();

Even if I take into account all this nonsense , all these development features when using the Closure Compiler, what will happen later when the code grows and other participants join the project.
How difficult it will be for yourself and others to maintain the code in the "correct" style. I would like to hear your opinion, maybe someone has already passed this stage and realized that this ADVANCED_MODE is what for?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alt_r, 2013-03-29
@alt_r

I use the Simple mode, for the most frequent combat cases, the very thing.
Not only does Advanced require such structures, but even somewhere it can suddenly break something

K
Konstantin, 2014-01-12
@constantant

The Google Closure Compiler is made for the Google Closure Library, which means that in order to use the compressor effectively, you must follow the rules and recommendations used in the reference lib.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question