uglifyjs small note

uglifyjs small note

uglifyjs is mainly used to compress js file size:

UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. https://www.npmjs.com/package/uglify-js

First of all, make sure that node has been installed when it is running .

Install uglifyjs

npm install uglify-js -g

run-m optional parameters:

uglifyjs math.js -m -o math.min.js

Cool! Batch code:

@echo off
:: Set the root directory of the compressed JS file, the script will automatically search and compress all JS according to the tree level
SET JSFOLDER=C:\Users\Administrator\Desktop\formini
echo is looking for JS files
chdir/d %JSFOLDER%
for/r. %%a in (*.js) do (
    @echo is compressing %%~a...
    uglifyjs %%~fa -m -o %%~fa
)
echo complete!
pause & exit

Partly excerpted from: https://www.cnblogs.com/zzsdream/p/5674866.htm

If the text is less than 300, the original official account cannot be sent, and a random text should be added:

In the ninth year of Yonghe, he was in Gui Chou, and at the beginning of spring, he would go to the Lanting Pavilion of Shanyin in Kuaiji, where he would be repaired. A group of talented people are complete, and a few years old are collected together. There are lofty mountains, magnificent forests and bamboos, and there are clear currents and turbulent turbulences. Although there is no prosperity of the silk and bamboo orchestra, one chant and one chant are enough to express the secret feelings.

It is the sun, the sky is clear and the breeze is smooth. Looking up at the size of the universe and looking at the prosperous categories, you can look forward to your eyes, which is enough for audiovisual entertainment, and you can believe in Coke.

Madam's appearance and respect, admiration for the first time. Or take it from the arms and enlighten the words in a room; or because of the entrustment, leave the waves outside. Although the joys are very different, the calmness is different, when they are happy with what they encounter, they are temporarily self-sufficient, and they don't know the coming of old; and when they are tired, emotions change with each other, and they feel emotional. Xiang Zhixin, between pitching, is an old trace, and we can’t help but be happy with it, the situation will be shortened and changed, and the end will come to an end! The ancients said: "Life and death are also great." Isn't it painful!

Every time I look at the reasons for the former people's interest, if they are united, it is not without the mourning of the text, which can not be explained in the memory. The solid knowledge that life and death are imaginary births, Qi Pengshang is arrogant. Looking at the present from the back, but also looking at the past as the present, sad husband! Therefore, the people in the Syrian era record their descriptions, although the world is different, so it is the same. Those who will be watching later will also be impressed by the gentleness.

Reference: https://cloud.tencent.com/developer/article/1486983 uglifyjs small notes-Cloud + Community-Tencent Cloud