License detector for UglifyJS that identifies and preserves license comments during minification
Overall
score
98%
Build a command-line tool that minifies multiple JavaScript files while preserving license comments across batch processing.
Your tool should:
The tool should be invoked as:
node minifier.js <input1> <output1> <input2> <output2> ...For example:
node minifier.js src/lib1.js dist/lib1.min.js src/lib2.js dist/lib2.min.js@generates
Given two JavaScript files with license headers, when processing them in batch, both output files should preserve their respective license comments @test
Given a file with a multi-line license comment followed by code, and another file with a single-line license, when processing them sequentially, each output should preserve only its own license comments @test
Given a file with no license and a file with a license on line 1, when processing them in order, the second file's license should be preserved @test
Provides JavaScript minification functionality.
Provides license comment detection and preservation during minification.
Install with Tessl CLI
npx tessl i tessl/npm-uglify-save-licensedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10