gluon-web-model: add minify flag support

This commit is contained in:
Jan-Niklas Burfeind 2023-01-02 15:35:32 +01:00
parent 348e938957
commit 389314f58a
4 changed files with 15 additions and 2 deletions

View File

@ -18,7 +18,7 @@ define Package/gluon-config-mode-core/install
$(INSTALL_DIR) $(1)/lib/gluon/config-mode/view/ $(1)/lib/gluon/config-mode/www/static/ $(INSTALL_DIR) $(1)/lib/gluon/config-mode/view/ $(1)/lib/gluon/config-mode/www/static/
$(LN) /lib/gluon/web/i18n $(1)/lib/gluon/config-mode/ $(LN) /lib/gluon/web/i18n $(1)/lib/gluon/config-mode/
$(LN) /lib/gluon/web/view/{error,model} $(1)/lib/gluon/config-mode/view/ $(LN) /lib/gluon/web/view/{error,model} $(1)/lib/gluon/config-mode/view/
$(LN) /lib/gluon/web/www/static/gluon-web-model.min.js $(1)/lib/gluon/config-mode/www/static/gluon-web-model.js $(LN) /lib/gluon/web/www/static/gluon-web-model.js $(1)/lib/gluon/config-mode/www/static/
endef endef
$(eval $(call BuildPackageGluon,gluon-config-mode-core)) $(eval $(call BuildPackageGluon,gluon-config-mode-core))

View File

@ -9,4 +9,17 @@ define Package/gluon-web-model
DEPENDS:=+gluon-web DEPENDS:=+gluon-web
endef endef
PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY
define Package/gluon-web-model/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon/web/www/static/
ifdef CONFIG_GLUON_MINIFY
$(INSTALL_DATA) ./javascript/gluon-web-model.min.js $(1)/lib/gluon/web/www/static/gluon-web-model.js
else
$(INSTALL_DATA) ./javascript/gluon-web-model.js $(1)/lib/gluon/web/www/static/
endif
endef
$(eval $(call BuildPackageGluon,gluon-web-model)) $(eval $(call BuildPackageGluon,gluon-web-model))

View File

@ -13,7 +13,7 @@
/* /*
Build using: Build using:
uglifyjs javascript/gluon-web-model.js -o files/lib/gluon/web/www/static/gluon-web-model.min.js -c -m --support-ie8 uglifyjs javascript/gluon-web-model.js -o javascript/gluon-web-model.min.js -c -m --support-ie8
*/ */