Makefile 1.1 KB

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