Makefile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. app_name=updatenotification
  2. project_dir=$(CURDIR)/../$(app_name)
  3. build_dir=$(CURDIR)/build
  4. source_dir=$(build_dir)/$(app_name)
  5. all: dev-setup build-js-production
  6. dev-setup: clean clean-dev npm-init
  7. npm-init:
  8. npm install
  9. npm-update:
  10. npm update
  11. build-js:
  12. npm run dev
  13. build-js-production:
  14. npm run build
  15. watch-js:
  16. npm run watch
  17. clean:
  18. rm -f js/$(app_name).js
  19. rm -f js/$(app_name).js.map
  20. rm -rf $(build_dir)
  21. clean-dev:
  22. rm -rf node_modules
  23. package: clean build-js-production
  24. mkdir -p $(source_dir)
  25. rsync -a \
  26. --exclude=/build \
  27. --exclude=/docs \
  28. --exclude=/js-src \
  29. --exclude=/l10n/.tx \
  30. --exclude=/tests \
  31. --exclude=/.git \
  32. --exclude=/.github \
  33. --exclude=/CONTRIBUTING.md \
  34. --exclude=/issue_template.md \
  35. --exclude=/README.md \
  36. --exclude=/SECURITY.md \
  37. --exclude=/.gitignore \
  38. --exclude=/.scrutinizer.yml \
  39. --exclude=/.travis.yml \
  40. --exclude=/.drone.yml \
  41. --exclude=/node_modules \
  42. --exclude=/npm-debug.log \
  43. --exclude=/package.json \
  44. --exclude=/package-lock.json \
  45. --exclude=/Makefile \
  46. $(project_dir)/ $(source_dir)