forked from usdoj/foia.gov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.2 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
JEKYLL_ENV=$(NODE_ENV)
JEKYLL_OPTS=
ifeq ($(APP_ENV), development)
JEKYLL_OPTS+=--config _config.yml,_config.development.yml
endif
ifeq ($(APP_ENV), staging)
JEKYLL_OPTS+=--config _config.yml,_config.staging.yml
endif
ifeq ($(APP_ENV), uat)
JEKYLL_OPTS+=--config _config.yml,_config.uat.yml
endif
ifeq ($(APP_ENV), production)
JEKYLL_OPTS+=--config _config.yml,_config.production.yml
endif
ifeq ($(APP_ENV), ddev)
JEKYLL_OPTS+=--config _config.yml,_config.ddev.yml
endif
all: build test
build:
npm run build
mkdir -p www.foia.gov/assets
cp -R node_modules/uswds/dist/fonts node_modules/uswds/dist/img www.foia.gov/assets
cp node_modules/exitscript/exitscript.min.js www.foia.gov/assets/js/
JEKYLL_ENV=$(JEKYLL_ENV) bundle exec jekyll build $(JEKYLL_OPTS)
clean:
rm -rf www.foia.gov/assets
rm -rf _site
serve:
-pkill -9 -f "node js/dev-server.js"
node js/dev-server.js
serve.detached:
-pkill -9 -f "node js/dev-server.js"
node js/dev-server.js &
test.features:
npx cucumber-js
test.html:
bin/htmlproofer.sh
test.lint:
npm run lint
test.functional:
npm test
test: clean build serve.detached test.functional test.lint test.html test.features
@echo OK
.PHONY: all build clean deploy test