-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (63 loc) · 1.95 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
.PHONY: dummy
SQLITE_DB_NAME := toils.sqlite
TMUX_SESSION_NAME := toils
seed-user: dummy
rm -f $(SQLITE_DB_NAME)
touch $(SQLITE_DB_NAME)
php artisan migrate
php artisan db:seed --class=UserFakeSeeder
seed-full: dummy
rm -f $(SQLITE_DB_NAME)
touch $(SQLITE_DB_NAME)
php artisan migrate
php artisan db:seed --class=FullFakeSeeder
lint: dummy
phpmd app text phpmd.xml
phpcs -s app
# Install NPM packages quietly.
setup-js: export NPM_CONFIG_PROGRESS=false
setup-js: export NO_UPDATE_NOTIFIER=1
setup-js:
npm install
# Install Composer packages quietly based on composer.lock
setup-php:
composer --no-interaction --no-ansi --no-suggest install
# Install all packages quietly.
setup: setup-php setup-js
# Check for out-of-date npm packages
outdated-js: export NO_UPDATE_NOTIFIER=1
outdated-js:
npm outdated || true
# Check for out-of-date composer packages
outdated-php:
composer show --outdated --direct
# Check for all out-of-date packages
outdated: outdated-php outdated-js
# Install newly updated npm packages.
update-js: export NO_UPDATE_NOTIFIER=1
update-js:
npm update
# Install newly updated composer packages and update composer.lock
update-php:
composer update
# Update all packages quietly
update: update-php update-js
# Create a package upgrade commit.
#
# "puc" stands for Package Upgrade Commit
puc: dummy
git checkout master
git add package.json package-lock.json composer.json composer.lock
git commit -m "Upgrade npm and composer packages"
workspace:
# 0: Editor
tmux new-session -d -s "$(TMUX_SESSION_NAME)" bash
tmux send-keys -t "$(TMUX_SESSION_NAME)" "$(EDITOR) ." C-m
# 1: Shell
tmux new-window -a -t "$(TMUX_SESSION_NAME)" bash
# 2: Webpack
tmux new-window -a -t "$(TMUX_SESSION_NAME)" -n "webpack" "npm run watch"
# 3: Dev server
tmux new-window -a -t "$(TMUX_SESSION_NAME)" -n "devserver" "php artisan serve --host 0.0.0.0 --port 8083"
tmux select-window -t "$(TMUX_SESSION_NAME)":0
tmux attach-session -t "$(TMUX_SESSION_NAME)"