This Python script is a simple program that is executed in the console. The program optimizes/compresses Javascript files with a few simple steps. First all comments will be removed. Here, however, I don't use a parser, but rather use regular expressions. In the next step, all blank lines are removed and then all spaces at the beginning of the line are removed. And finally all line breaks are removed. If the program has completed all steps without errors, a new file with the extension *.min.js will be created. This file is stored in the same directory as the input file. With this script I just wanted a simple and quick solution to make JS files a little less readable. I fully understand that I can also use tools like UglifyJS. But I just felt like getting to grips with Python again. And you can always use a simple tool like that, can't you?
-
Notifications
You must be signed in to change notification settings - Fork 0
A small collection of python scripts
License
praetoriani/my-py-scripts
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A small collection of python scripts
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published