This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/frontend/Makefile

33 lines
1022 B
Makefile
Raw Normal View History

2018-09-20 16:44:46 +00:00
node_modules:
npm install
.PHONY: watch
watch: node_modules
npm start
clean:
rm -rf dist/
rm -f sha512sums
2018-09-20 16:44:46 +00:00
.PHONY: build
build: prod
prod: node_modules clean
2018-09-20 16:44:46 +00:00
@echo Building with parcel
2018-10-11 15:09:55 +00:00
NODE_DEV=production ./node_modules/.bin/parcel build --out-dir dist/app --public-url /app/ src/index.hbs
NODE_ENV=production ./node_modules/.bin/parcel build --out-dir dist src/lost.html src/error.html
2018-09-20 16:44:46 +00:00
@echo Generate checksums
find ./dist/ -exec sha512sum {} + | awk -F \. '{ if($$4 != "map") print $$0}' | awk -F \/ '{ if($$3 == "lost.html") {} else if ($$3 == "error.html") {} else print $$0}' > sha512sums
@echo Creating tarball
tar -czf lateinicus-web.tar.gz dist/
2018-09-20 16:50:15 +00:00
dev: node_modules clean
@echo Building with parcel
2018-10-11 15:09:55 +00:00
NODE_ENV=development ./node_modules/.bin/parcel build --out-dir dist/app --public-url /app/ src/index.hbs
NODE_ENV=development ./node_modules/.bin/parcel build --out-dir dist src/lost.html src/error.html
chmod 604 -R dist/app/*
chmod 604 dist/error.html dist/lost.html
chmod 705 dist dist/app