Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (59 loc) · 1.88 KB
/
Copy pathMakefile
File metadata and controls
80 lines (59 loc) · 1.88 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# This file is licensed under the Affero General Public License version 3 or
# later. See the COPYING file.
app_name=$(notdir $(CURDIR))
build_tools_directory=$(CURDIR)/build/tools
composer=$(shell which composer 2> /dev/null)
all: dev-setup lint build-js-production test
build: install-composer-deps build-js
# Dev env management
dev-setup: clean clean-dev install-composer-deps-dev js-init
composer.phar:
curl -sS https://getcomposer.org/installer | php
install-composer-deps: composer.phar
php composer.phar install --no-dev -o
install-composer-deps-dev: composer.phar
php composer.phar install -o
js-init:
npm install
npm-update:
npm update
# Building
build-js: js-init
npm run dev
build-js-production: js-init
npm run build
watch-js: js-init
npm run watch
# Linting
lint: js-init
npm run lint
lint-fix: js-init
npm run fix
# Style linting
stylelint: js-init
npm run lint:style
stylelint-fix: js-init
npm run lint:fix:style
phplint:
./vendor/bin/php-cs-fixer fix --dry-run
phplint-fix:
./vendor/bin/php-cs-fixer fix
# Cleaning
clean:
rm -rf js/*
clean-dev:
rm -rf node_modules
git checkout composer.json
git checkout composer.lock
rm -rf vendor
pack: install-composer-deps
mkdir -p archive
tar --exclude='./Makefile' --exclude='./webpack*' --exclude='./.*' --exclude='./ts' --exclude='./tests' --exclude='./node_modules' --exclude='./archive' \
--exclude='./babel.config.js' --exclude='./commitlint.config.js' --exclude='./tsconfig.json' --exclude='./declarations.d.ts' \
--exclude='./package.json' --exclude='./package-lock.json' --exclude='./composer.json' --exclude='./composer.lock' --exclude='./composer.phar' \
--exclude='./phpunit*.xml' --exclude='./psalm.xml' --exclude='./scripts' \
-zcvf ./archive/cloud_bbb.tar.gz . --transform s/^./bbb/
# Tests
test:
./vendor/phpunit/phpunit/phpunit -c phpunit.xml
./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml