2021-01-22 13:41:13 +03:00
|
|
|
# Makefile for building the project
|
2019-05-14 02:15:45 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
app_name=forms
|
2021-01-22 13:59:51 +03:00
|
|
|
project_dir=$(CURDIR)/../$(app_name)
|
2021-01-22 13:41:13 +03:00
|
|
|
build_dir=$(CURDIR)/build/artifacts
|
2021-11-10 18:57:36 +03:00
|
|
|
appstore_package_name=$(build_dir)/$(app_name)
|
2021-01-22 13:41:13 +03:00
|
|
|
source_dir=$(build_dir)/source
|
2019-05-14 02:15:45 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
all: clean install-composer-deps install-npm-deps-dev build-js-production appstore
|
2019-05-14 02:15:45 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
clean:
|
|
|
|
rm -rf $(build_dir)
|
|
|
|
rm -rf node_modules
|
|
|
|
rm -rf vendor
|
2021-03-09 18:27:07 +03:00
|
|
|
rm -rf js
|
2021-01-22 13:41:13 +03:00
|
|
|
|
|
|
|
install-deps: install-composer-deps-dev install-npm-deps-dev
|
2019-05-14 02:15:45 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
install-composer-deps:
|
|
|
|
composer install --no-dev -o
|
2019-05-14 02:15:45 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
install-composer-deps-dev:
|
|
|
|
composer install -o
|
2019-09-03 12:58:51 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
install-npm-deps:
|
|
|
|
npm install --production
|
2019-09-03 12:58:51 +03:00
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
install-npm-deps-dev:
|
|
|
|
npm install
|
|
|
|
|
|
|
|
optimize-js: install-npm-deps-dev
|
|
|
|
npm run build
|
2019-09-03 12:58:51 +03:00
|
|
|
|
|
|
|
build-js:
|
|
|
|
npm run dev
|
|
|
|
|
|
|
|
build-js-production:
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
watch-js:
|
|
|
|
npm run watch
|
|
|
|
|
2021-01-22 13:41:13 +03:00
|
|
|
dev-setup: install-composer-deps-dev install-npm-deps-dev build-js
|
2019-09-03 12:58:51 +03:00
|
|
|
|
2020-04-29 10:12:50 +03:00
|
|
|
appstore:
|
2021-11-10 18:26:14 +03:00
|
|
|
rm -rf $(build_dir)
|
|
|
|
mkdir -p $(build_dir)
|
2021-01-22 13:59:51 +03:00
|
|
|
tar cvzf $(appstore_package_name).tar.gz \
|
2020-04-29 10:12:50 +03:00
|
|
|
--exclude-vcs \
|
2021-01-22 13:41:13 +03:00
|
|
|
$(project_dir)/appinfo \
|
|
|
|
$(project_dir)/COPYING \
|
|
|
|
$(project_dir)/css \
|
|
|
|
$(project_dir)/img \
|
|
|
|
$(project_dir)/js \
|
|
|
|
$(project_dir)/l10n \
|
|
|
|
$(project_dir)/lib \
|
|
|
|
$(project_dir)/templates \
|
|
|
|
$(project_dir)/vendor \
|
|
|
|
$(project_dir)/CHANGELOG.md
|