The source code of my personal website! https://jfenn.me/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

44 lines
828 B

  1. .PHONY: all build serve clean
  2. NPM := pnpm
  3. NPX := pnpx
  4. ifeq (, $(shell which pnpm))
  5. NPM = npm
  6. NPX = npx
  7. endif
  8. DESTDIR?=out
  9. all: serve
  10. install: package-install.lock
  11. package-install.lock: package.json
  12. ${NPM} install
  13. touch package-install.lock
  14. assets/css/styles.css: install assets/css/styles.scss
  15. ${NPX} sass assets/css/styles.scss assets/css/styles.css
  16. build: install assets/css/styles.css
  17. ${NPX} @11ty/eleventy
  18. serve: install assets/css/styles.css
  19. ${NPX} @11ty/eleventy --serve
  20. # TODO: replace this with better CI
  21. deploy: prune install assets/css/styles.css
  22. ${NPX} @11ty/eleventy
  23. git add -f _site/
  24. git commit -m 'deploy'
  25. git subtree split --prefix _site -b temp
  26. git push -f deploy temp:main
  27. git branch -D temp
  28. git reset HEAD~
  29. prune:
  30. rm -r _site/
  31. clean: prune
  32. rm package-install.lock
  33. rm -rf node_modules/