2018-02-26 19:47:42 +03:00
|
|
|
app_name=updatenotification
|
2018-01-30 19:06:40 +03:00
|
|
|
|
|
|
|
project_dir=$(CURDIR)/../$(app_name)
|
|
|
|
build_dir=$(CURDIR)/build
|
|
|
|
source_dir=$(build_dir)/$(app_name)
|
|
|
|
|
2018-06-07 10:34:24 +03:00
|
|
|
all: dev-setup build-js-production
|
2018-01-30 19:06:40 +03:00
|
|
|
|
2018-06-07 09:35:00 +03:00
|
|
|
dev-setup: clean clean-dev npm-init
|
|
|
|
|
|
|
|
npm-init:
|
|
|
|
npm install
|
2018-01-30 19:06:40 +03:00
|
|
|
|
|
|
|
npm-update:
|
|
|
|
npm update
|
|
|
|
|
|
|
|
build-js:
|
|
|
|
npm run dev
|
|
|
|
|
|
|
|
build-js-production:
|
|
|
|
npm run build
|
|
|
|
|
2018-06-07 09:35:00 +03:00
|
|
|
watch-js:
|
|
|
|
npm run watch
|
|
|
|
|
2018-01-30 19:06:40 +03:00
|
|
|
clean:
|
2018-06-19 07:26:57 +03:00
|
|
|
rm -f js/$(app_name).js
|
|
|
|
rm -f js/$(app_name).js.map
|
2018-01-30 19:06:40 +03:00
|
|
|
rm -rf $(build_dir)
|
|
|
|
|
2018-06-07 09:35:00 +03:00
|
|
|
clean-dev:
|
|
|
|
rm -rf node_modules
|
|
|
|
|
2018-01-30 19:06:40 +03:00
|
|
|
package: clean build-js-production
|
|
|
|
mkdir -p $(source_dir)
|
|
|
|
rsync -a \
|
|
|
|
--exclude=/build \
|
|
|
|
--exclude=/docs \
|
|
|
|
--exclude=/js-src \
|
|
|
|
--exclude=/l10n/.tx \
|
|
|
|
--exclude=/tests \
|
|
|
|
--exclude=/.git \
|
|
|
|
--exclude=/.github \
|
|
|
|
--exclude=/CONTRIBUTING.md \
|
|
|
|
--exclude=/issue_template.md \
|
|
|
|
--exclude=/README.md \
|
2019-12-22 23:21:18 +03:00
|
|
|
--exclude=/SECURITY.md \
|
2018-01-30 19:06:40 +03:00
|
|
|
--exclude=/.gitignore \
|
|
|
|
--exclude=/.scrutinizer.yml \
|
|
|
|
--exclude=/.travis.yml \
|
|
|
|
--exclude=/.drone.yml \
|
|
|
|
--exclude=/node_modules \
|
|
|
|
--exclude=/npm-debug.log \
|
|
|
|
--exclude=/package.json \
|
|
|
|
--exclude=/package-lock.json \
|
|
|
|
--exclude=/Makefile \
|
|
|
|
$(project_dir)/ $(source_dir)
|