Re: [Buildroot] [PATCH 1/2] package/uglifyjs: new package
Alexis Lothoré via buildroot <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Hi Thomas, On Fri Aug 7, 2026 at 9:44 AM CEST, Thomas Petazzoni wrote: > Hello Alexis, > > On Thu, Aug 06, 2026 at 11:24:22PM +0200, Alexis Lothoré wrote: >> uglifyjs is a JavaScript parser, minifier, compressor and beautifier >> toolkit. >> >> https://github.com/mishoo/UglifyJS >> >> Signed-off-by: Alexis Lothoré <[email protected]> > > Thanks for the patch. Overall looks good. One or two suggestions below. > >> new file mode 100644 >> index 000000000000..921d4dffee8e >> --- /dev/null >> +++ b/package/uglifyjs/uglifyjs.mk >> @@ -0,0 +1,23 @@ >> +################################################################################ >> +# >> +# uglifyjs >> +# >> +################################################################################ >> + >> +UGLIFYJS_VERSION = 3.19.3 >> +UGLIFYJS_SITE = $(call github,mishoo,UglifyJS,v$(UGLIFYJS_VERSION)) >> +UGLIFYJS_LICENSE = BSD-2-Clause >> +UGLIFYJS_LICENSE_FILES = LICENSE >> +HOST_UGLIFYJS_DEPENDENCIES = host-nodejs >> + >> +define HOST_UGLIFYJS_INSTALL_CMDS >> + $(INSTALL) -m 0755 -d $(HOST_DIR)/lib/node_modules/uglify-js >> + rsync -a $(@D)/bin $(HOST_DIR)/lib/node_modules/uglify-js/ >> + rsync -a $(@D)/lib $(HOST_DIR)/lib/node_modules/uglify-js/ >> + rsync -a $(@D)/tools $(HOST_DIR)/lib/node_modules/uglify-js/ > > We more commonly use "cp -dpfr" for this kind of situation, and you > could also use a loop? > >> + $(INSTALL) -m 0755 $(@D)/package.json $(HOST_DIR)/lib/node_modules/uglify-js/ > > Something like: > > $(foreach p,bin lib tools package.json,\ > cp -dpfr $(@D)/$(p) $(HOST_DIR)/lib/node_modules/uglify-js/ > ) > Indeed, it looks better with the loop, I'll update accordingly. >> + ln -sf ../lib/node_modules/uglify-js/bin/uglifyjs $(HOST_DIR)/bin/uglifyjs >> + > > Drop this empty new line. > >> +endef >> + >> +$(eval $(host-generic-package)) >> diff --git a/support/testing/tests/package/test_uglifyjs.py b/support/testing/tests/package/test_uglifyjs.py >> new file mode 100644 >> index 000000000000..666a5fb46ff1 >> --- /dev/null >> +++ b/support/testing/tests/package/test_uglifyjs.py > > Forgot about commenting on this on the DEVELOPERS file: please add > this file to the DEVELOPERS file as well, under your name. This way if > this test fails in our CI, you'll get notified. Ah,true, I've likely missed tests from some other packages then, I'll update here and send a separate patch for existing packages. Alexis > Thanks! > > Thomas -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot