Closed jerry1970 closed 3 years ago
The README says "You can also just merge a complete folder with JavaScript files without the Root JavaScript file.". That's what I am trying to do.
Files in /var/www/my-proj/js/:
/var/www/my-proj/js/
first-script.js second-script.js jquery-3.6.0.min.js
Command line:
/var/www/my-proj/node_modules/.bin/uglify-merge --src /var/www/my-proj/js/ --output ../../public_html/assets/js/my-proj.min.js --uglify {\"mangle\":{}}
I get this error:
No root JavaScript file was found!
The output file is not generated, still I get exit code 0.
Using the root.js with imports it seems to work, but if I wanted the whole directory without the root.js, that would save me maintaining a file.
Hi! You can use uglify-merge in two ways. With a root file and without a root file. If you don't want to use a root file, you need to add the option -a
Doh! Completely missed the -a... Thanks!
-a
The README says "You can also just merge a complete folder with JavaScript files without the Root JavaScript file.". That's what I am trying to do.
Files in
/var/www/my-proj/js/
:Command line:
I get this error:
The output file is not generated, still I get exit code 0.
Using the root.js with imports it seems to work, but if I wanted the whole directory without the root.js, that would save me maintaining a file.