2018-06-20 18:50:16 +03:00
|
|
|
# Makefile for building the project
|
|
|
|
|
|
|
|
app_name=guests
|
|
|
|
project_dir=$(CURDIR)/../$(app_name)
|
2021-11-10 10:40:54 +03:00
|
|
|
build_dir=$(CURDIR)/build/artifacts
|
2018-06-20 18:50:16 +03:00
|
|
|
package_name=$(app_name)
|
2018-12-12 20:32:36 +03:00
|
|
|
|
2019-08-05 11:31:58 +03:00
|
|
|
all: dev-setup build-js-production
|
2018-06-20 18:50:16 +03:00
|
|
|
|
2019-08-05 11:31:58 +03:00
|
|
|
# Dev env management
|
|
|
|
dev-setup: clean clean-dev npm-init
|
2018-12-13 19:13:14 +03:00
|
|
|
|
2019-08-05 11:31:58 +03:00
|
|
|
npm-init:
|
2021-08-06 09:38:45 +03:00
|
|
|
npm ci
|
2018-12-13 19:13:14 +03:00
|
|
|
|
2019-08-05 11:31:58 +03:00
|
|
|
npm-update:
|
|
|
|
npm update
|
|
|
|
|
|
|
|
# Building
|
|
|
|
build-js:
|
|
|
|
npm run dev
|
|
|
|
|
|
|
|
build-js-production:
|
|
|
|
npm run build
|
2018-06-20 18:50:16 +03:00
|
|
|
|
2019-08-05 11:31:58 +03:00
|
|
|
watch-js:
|
|
|
|
npm run watch
|
2018-06-20 18:50:16 +03:00
|
|
|
|
2019-08-05 11:31:58 +03:00
|
|
|
# Cleaning
|
|
|
|
clean:
|
|
|
|
rm -rf js
|
|
|
|
|
|
|
|
clean-dev:
|
|
|
|
rm -rf node_modules
|
2021-11-10 10:40:54 +03:00
|
|
|
rm -rf vendor
|
2018-12-12 20:32:36 +03:00
|
|
|
|
2019-08-14 23:37:18 +03:00
|
|
|
# Linting
|
|
|
|
lint:
|
|
|
|
npm run lint
|
|
|
|
|
|
|
|
lint-fix:
|
|
|
|
npm run lint:fix
|
|
|
|
|
|
|
|
# Style linting
|
|
|
|
stylelint:
|
|
|
|
npm run stylelint
|
|
|
|
|
|
|
|
stylelint-fix:
|
|
|
|
npm run stylelint:fix
|
2018-06-20 18:50:16 +03:00
|
|
|
|
2021-11-10 10:40:54 +03:00
|
|
|
appstore: clean-dev
|
|
|
|
mkdir -p $(build_dir)
|
2018-06-20 18:50:16 +03:00
|
|
|
tar --exclude-vcs \
|
2021-11-10 10:40:54 +03:00
|
|
|
--exclude=$(build_dir) \
|
2018-06-20 18:50:16 +03:00
|
|
|
--exclude=$(project_dir)/node_modules \
|
2021-11-10 10:40:54 +03:00
|
|
|
--exclude=$(project_dir)/vendor \
|
2019-04-24 17:30:26 +03:00
|
|
|
--exclude=$(project_dir)/webpack* \
|
2018-06-20 18:50:16 +03:00
|
|
|
--exclude=$(project_dir)/.gitattributes \
|
|
|
|
--exclude=$(project_dir)/.gitignore \
|
|
|
|
--exclude=$(project_dir)/.travis.yml \
|
|
|
|
--exclude=$(project_dir)/.tx \
|
|
|
|
--exclude=$(project_dir)/.scrutinizer.yml \
|
|
|
|
--exclude=$(project_dir)/CONTRIBUTING.md \
|
|
|
|
--exclude=$(project_dir)/package.json \
|
|
|
|
--exclude=$(project_dir)/screenshots \
|
|
|
|
--exclude=$(project_dir)/Makefile \
|
2019-04-24 17:30:26 +03:00
|
|
|
--exclude=$(project_dir)/tests \
|
2019-08-06 09:05:44 +03:00
|
|
|
--exclude=$(project_dir)/src \
|
2021-11-10 10:40:54 +03:00
|
|
|
-cvzf $(build_dir)/$(package_name).tar.gz $(project_dir)
|