allow building standarlone afx GUI API

This commit is contained in:
lxsang 2020-09-18 13:20:22 +02:00
parent 5ef3bfe7f0
commit 99a029bdd3

View File

@ -11,18 +11,7 @@ ifeq ($(UNAME_S),Darwin)
GSED=gsed GSED=gsed
endif endif
tags = dist/core/tags/tag.js \
javascripts= dist/core/core.js \
dist/core/settings.js \
dist/core/handles/RemoteHandle.js \
dist/core/Announcerment.js \
dist/core/vfs.js \
dist/core/db.js \
dist/core/BaseModel.js \
dist/core/BaseApplication.js \
dist/core/BaseService.js \
dist/core/BaseDialog.js \
dist/core/tags/tag.js \
dist/core/tags/WindowTag.js \ dist/core/tags/WindowTag.js \
dist/core/tags/TileLayoutTags.js \ dist/core/tags/TileLayoutTags.js \
dist/core/tags/ResizerTag.js \ dist/core/tags/ResizerTag.js \
@ -43,11 +32,26 @@ javascripts= dist/core/core.js \
dist/core/tags/FileViewTag.js \ dist/core/tags/FileViewTag.js \
dist/core/tags/OverlayTag.js \ dist/core/tags/OverlayTag.js \
dist/core/tags/AppDockTag.js \ dist/core/tags/AppDockTag.js \
dist/core/tags/SystemPanelTag.js \ dist/core/tags/SystemPanelTag.js
javascripts= dist/core/core.js \
dist/core/settings.js \
dist/core/handles/RemoteHandle.js \
dist/core/Announcerment.js \
dist/core/vfs.js \
dist/core/db.js \
dist/core/BaseModel.js \
dist/core/BaseApplication.js \
dist/core/BaseService.js \
dist/core/BaseDialog.js \
$(tags) \
dist/core/gui.js \ dist/core/gui.js \
dist/core/pm.js \ dist/core/pm.js \
dist/bootstrap.js dist/bootstrap.js
antfx = $(tags) \
dist/core/Announcerment.js
packages = Syslog CodePad Files MarketPlace Setting packages = Syslog CodePad Files MarketPlace Setting
main: initd build_javascripts build_themes libs build_packages languages main: initd build_javascripts build_themes libs build_packages languages
@ -60,9 +64,40 @@ lite: build_javascripts build_themes build_packages
#%.js: %.coffee #%.js: %.coffee
# coffee --compile $< # coffee --compile $<
build_javascripts: ts:
-rm -rf dist -rm -rf dist
tsc -p tsconfig.json tsc -p tsconfig.json
standalone_tags: ts
@echo "$(BLUE)Bundling standalone tags files$(NC)"
- mkdir -p $(BUILDDIR)
- rm $(BUILDDIR)/afx*
#echo "(function() {" > $(BUILDDIR)/scripts/antos.js
for f in $(antfx); do \
(cat "$${f}"; echo) >> dist/afx.js;\
rm "$${f}";\
done
echo "var Ant=this;" >> dist/afx.js
terser dist/afx.js --compress --mangle --output $(BUILDDIR)/afx.js
# standalone theme
@for f in src/themes/system/afx-*.css; do \
if [ "$$f" != "src/themes/system/antos.css" ]; then \
echo "$$f"; \
(cat "$${f}"; echo) >> $(BUILDDIR)/afx.css; \
fi;\
done
@for f in src/themes/antos_light/afx-*.css; do \
if [ "$$f" != "src/themes/antos_light/antos.css" ]; then \
echo "$$f"; \
(cat "$${f}"; echo) >> $(BUILDDIR)/afx.css; \
fi;\
done
# uglifycss --output $(BUILDDIR)/afx.css $(BUILDDIR)/afx.css
rm -r dist/core
build_javascripts: ts
@echo "$(BLUE)Bundling javascript files$(NC)" @echo "$(BLUE)Bundling javascript files$(NC)"
- mkdir -p $(BUILDDIR)/scripts - mkdir -p $(BUILDDIR)/scripts
- rm $(BUILDDIR)/scripts/antos.js - rm $(BUILDDIR)/scripts/antos.js