Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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=/.travis.yml \
  42. --exclude=/.drone.yml \
  43. --exclude=/node_modules \
  44. --exclude=/npm-debug.log \
  45. --exclude=/package.json \
  46. --exclude=/package-lock.json \
  47. --exclude=/Makefile \
  48. $(project_dir)/ $(source_dir)