-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
42 lines (28 loc) · 1.06 KB
/
makefile
File metadata and controls
42 lines (28 loc) · 1.06 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
.PHONY: help install dev start stop restart analyse build
install: ## Setup all project dependencies
yarn
## Development tasks
restart: ## Restart
yarn pm2:dev:restart
start: ## Start server for SSR
yarn pm2:dev:start
stop: ## Stop SSR server
yarn pm2:dev:stop
analyze: ## build webpack for client bundles analyse
NODE_ENV=analyse ./node_modules/.bin/webpack --config ./resources/webpack/client.js -d --display-used-exports
analyze-prod: ## build webpack for client bundles analyse
NODE_ENV=analyse ./node_modules/.bin/webpack --config ./resources/webpack/client.js -p --display-used-exports
build:
yarn build:client
yarn build:server
## Production tasks
restart-production: stop-production start-production
start-production: build-production ## Start server for SSR
./node_modules/.bin/pm2 start resources/pm2/production.json
stop-production: ## Stop SSR server
./node_modules/.bin/pm2 delete resources/pm2/production.json
build-production:
yarn build:client:production
yarn build:server:production
logs: ## Display SSR server logs
./node_modules/.bin/pm2 logs