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 09:35:00 +03:00
|
|
|
all: dev-setup build-js-production package
|
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-07 09:35:00 +03:00
|
|
|
rm -f js/merged.js
|
|
|
|
rm -f js/merged.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 \
|
|
|
|
--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)
|