Improved compilation toolchain

This commit is contained in:
Cooper Dalrymple
2025-07-22 11:09:28 -05:00
parent 03eb670dfb
commit b901fcdf8d
10 changed files with 202 additions and 36 deletions

View File

@@ -1,34 +1,23 @@
PACKAGE = OgreAlert
SLUG = ogrealert
DIR = ./$(PACKAGE)
all: install
all: $(SLUG).zip
reinstall: clean install
$(SLUG).zip: clean dir copy zip
clean: clean-composer clean-npm
dir:
mkdir $(DIR)
clean-composer:
rm -rf acf || true
rm -rf vendor/* || true
rm -rf lib/* || true
rm composer.lock || true
composer clearcache
copy:
cp -RT ./assets $(DIR)/assets
cp -RT ./inc $(DIR)/inc
cp -RT ./lib $(DIR)/lib
cp -RT ./templates $(DIR)/templates
cp -f ./* $(DIR) || true
clean-npm:
rm -rf node_modules/* || true
rm package-lock.json || true
rm $(DIR)/Makefile
rm $(DIR)/composer.json
rm $(DIR)/composer.lock
rm $(DIR)/$(SLUG).zip || true
install:
composer install
npm install
rm -r $(DIR)/assets/sass/lib
rm $(DIR)/assets/sass/*.scss
rm $(DIR)/assets/sass/*.map
zip:
zip -r ./$(SLUG).zip $(DIR)
rm -r $(DIR) || true
clean:
rm -r $(DIR) || true
rm ./$(SLUG).zip || true
package: install
gulp package