-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmakefile
92 lines (67 loc) · 1.84 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Configuration
YARNFILE := package.json
COMPOSERFILE := composer.json
MIXFILE := webpack.mix.js
DEPLOY := Envoy.blade.php
DOTENV := .env
# Tasks
all: install
install: yarn composerinstall generatekey
update: yarnupgrade composerupdate
status: yarncheck
build: webpackdev
buildproduction: webpackprod
deploy: install buildproduction runtests envoy
deployproduction: install buildproduction runtests envoyproduction
# Commands
yarn: $(YARNFILE)
yarn
generatekey: $(DOTENV)
php artisan key:generate
composerinstall: $(COMPOSERFILE)
composer update --lock --prefer-dist --no-interaction
composerinstalldev: $(COMPOSERFILE)
composer install --prefer-dist --no-interaction && composer dump-autoload --optimize;
composerinstallproduction: $(COMPOSERFILE)
composer install --prefer-dist --no-dev --no-interaction && composer dump-autoload --optimize;
webpackdev: $(MIXFILE)
npm run development
webpackprod: $(MIXFILE)
npm run production
watch: $(MIXFILE)
npm run watch-poll
yarnupgrade: $(YARNFILE)
yarn upgrade
composerupdate: $(COMPOSERFILE)
composer update
yarncheck: $(YARNFILE)
yarn outdated
runtests: $(COMPOSERFILE)
php artisan view:clear
php artisan config:clear
php artisan test
phplint: $(COMPOSERFILE)
./vendor/bin/pint
phplintdry: $(COMPOSERFILE)
./vendor/bin/pint --test -v
stylelint:
stylelint ./resources/scss/**/*.scss
stylelintfix:
stylelint ./resources/scss/**/*.scss --fix
coverage: $(COMPOSERFILE)
phpbrew ext enable xdebug && XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-html coverages && phpbrew ext disable xdebug
envoy: $(DEPLOY)
envoy run deploy
envoyproduction: $(DEPLOY)
envoy run deploy --on="production"
clean:
rm -rf node_modules vendor
# Initialize files if they don't exist
$(YARNFILE):
yarn init
$(COMPOSERFILE):
composer init
$(MIXFILE):
touch $(webpack.mix.js)
$(DOTENV):
cp .env.example .env