forked from pa11y/pa11y-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (48 loc) · 1.52 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
# Color helpers
C_CYAN=\x1b[34;01m
C_RESET=\x1b[0m
# Group targets
all: deps lint test
ci: lint test
# Install dependencies
deps:
@echo "$(C_CYAN)> installing dependencies$(C_RESET)"
@npm install
# Lint JavaScript
lint: jshint jscs
# Run JSHint
jshint:
@echo "$(C_CYAN)> linting javascript$(C_RESET)"
@./node_modules/.bin/jshint .
# Run JavaScript Code Style
jscs:
@echo "$(C_CYAN)> checking javascript code style$(C_RESET)"
@./node_modules/.bin/jscs .
# Run all tests
test: test-integration
# Run integration tests
test-integration:
@echo "$(C_CYAN)> running integration tests$(C_RESET)"
@./node_modules/.bin/mocha ./test/integration --reporter spec --recursive --timeout 5000 --slow 50
# Compile LESS
less:
@echo "$(C_CYAN)> compiling less$(C_RESET)"
@./node_modules/.bin/lessc -x ./public/less/main.less ./public/css/site.min.css
# Compile client-side JavaScript
uglify:
@echo "$(C_CYAN)> compiling client-side JavaScript$(C_RESET)"
@./node_modules/.bin/uglifyjs \
public/js/vendor/jquery/jquery.min.js \
public/js/vendor/bootstrap/js/alert.js \
public/js/vendor/bootstrap/js/dropdown.js \
public/js/vendor/bootstrap/js/tooltip.js \
public/js/vendor/bootstrap/js/transition.js \
public/js/vendor/bootstrap/js/collapse.js \
public/js/vendor/flot/jquery.flot.js \
public/js/vendor/flot/jquery.flot.dashes.js \
public/js/vendor/flot/jquery.flot.time.js \
public/js/vendor/flot/jquery.flot.selection.js \
public/js/vendor/flot/jquery.flot.resize.js \
public/js/site.js \
-o ./public/js/site.min.js
.PHONY: test