Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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=/.gitignore \
  37. --exclude=/.scrutinizer.yml \
  38. --exclude=/.travis.yml \
  39. --exclude=/.drone.yml \
  40. --exclude=/node_modules \
  41. --exclude=/npm-debug.log \
  42. --exclude=/package.json \
  43. --exclude=/package-lock.json \
  44. --exclude=/Makefile \
  45. $(project_dir)/ $(source_dir)