ocdownloader
ocdownloader copied to clipboard
How to edit minified js files?
As I see minifyed versions of JS must be removed from dev versions. It's almost impossible to edit it and complete impossible to check changes. Or it's must be provided recommended tool for compression (still bad idea). I think that files must be compressed immediately before publication.
Indeed, they should be generated before packaging a release using a build system. For now I use this to regenerate them after modifying the non-minified Javascript files: https://github.com/mishoo/UglifyJS2
If I pack it myself, you can not test it for security - just make sure it's working. So I still think that in dev source must be no packed scripts.
@e-alfred what do you think of adding the minifiers for CSS and JS to a package.json
? I would then specify some scripts there that handle the minification. As a bonus I could add a Makefile
doing everyhing like installing dependencies.
For the tooling I suggest these:
- JS: https://github.com/mishoo/UglifyJS2 (because you're already using it)
- CSS: https://github.com/cssnano/cssnano