forked from nextcloud/forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (45 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Makefile for building the project
app_name=forms
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
appstore_package_name=$(build_dir)/$(app_name)
source_dir=$(build_dir)/source
all: clean install-composer-deps install-npm-deps-dev build-js-production appstore
clean:
rm -rf $(build_dir)
rm -rf node_modules
rm -rf vendor
rm -rf js
install-deps: install-composer-deps-dev install-npm-deps-dev
install-composer-deps:
composer install --no-dev -o
install-composer-deps-dev:
composer install -o
install-npm-deps:
npm install --production
install-npm-deps-dev:
npm install
optimize-js: install-npm-deps-dev
npm run build
build-js:
npm run dev
build-js-production:
npm run build
watch-js:
npm run watch
dev-setup: install-composer-deps-dev install-npm-deps-dev build-js
appstore:
rm -rf $(build_dir)
mkdir -p $(build_dir)
tar cvzf $(appstore_package_name).tar.gz \
--exclude-vcs \
$(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