S
S
sanex33392015-10-09 21:23:08
JavaScript
sanex3339, 2015-10-09 21:23:08

Is there a minifier for gulp, with the ability to disable the minification of argument names in the object's constructor?

Is there a minifier for gulp, with the ability to disable the minification of argument names in the object's constructor?
In the IOC container, I would like to take dependencies directly from the constructor arguments, and they are minified by all sorts of uglifyers, but at the same time I don’t want to chop off the minification of all argument names of all functions, only in the constructor.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg ak-o, 2015-10-09
@ak-o

try source-maps :) though FF chews them badly, but Chrome does it with a bang

S
sanex3339, 2015-10-10
@sanex3339

I came up with (in theory) so far such a crutch: at the assembly stage with Gulp, after converting .ts files into 1 .js file, get the contents of this file, go through it regularly and get from lines like
IDependencyA and IDependencyB. The presence of the I prefix at the beginning of the argument name is mandatory, we will not collect variables without a prefix.
Collect all the results in an array and slip it into the reserved uglify'er option.
cb18b23917234c9b85ec8a3a5cc05da0.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question