Commit 4565a1d7 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

package: add jsmin (javascript minimizer)

parent 1886506b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -328,6 +328,7 @@ source "package/flot/Config.in"
source "package/jquery/Config.in"
source "package/jquery-sparkline/Config.in"
source "package/jquery-validation/Config.in"
source "package/jsmin/Config.in"
endmenu

menu "Networking"
+11 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_JSMIN
	bool "jsmin"
	help
	  JSMin is a filter which removes comments and unnecessary
	  whitespace from JavaScript files. It typically reduces
	  filesize by half, resulting in faster downloads. It also
	  encourages a more expressive programming style because it
	  eliminates the download cost of clean, literate
	  self-documentation.

	  http://www.crockford.com/javascript/jsmin.html

package/jsmin/jsmin.mk

0 → 100644
+25 −0
Original line number Diff line number Diff line
JSMIN_VERSION = a9b47554d5684a55301a2eb7ca8480b7ee7630d4
JSMIN_SITE = git://github.com/douglascrockford/JSMin.git

define JSMIN_BUILD_CMDS
	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin
endef

define JSMIN_INSTALL_TARGET_CMDS
	$(INSTALL) -m 0755 -D $(@D)/jsmin $(TARGET_DIR)/usr/bin/jsmin
endef

define INPUT_EVENT_DAEMON_UNINSTALL_TARGET_CMDS
	rm -f $(TARGET_DIR)/usr/bin/jsmin
endef

define HOST_JSMIN_BUILD_CMDS
	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin
endef

define HOST_JSMIN_INSTALL_CMDS
	$(INSTALL) -m 0755 -D $(@D)/jsmin $(HOST_DIR)/usr/bin/jsmin
endef

$(eval $(call GENTARGETS))
$(eval $(call GENTARGETS,host))