-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (28 loc) · 678 Bytes
/
Makefile
File metadata and controls
41 lines (28 loc) · 678 Bytes
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
#
# Stdlib-compliant Makefile Structure
#
# VARIABLES #
ESLINT ?= ./node_modules/.bin/eslint
TAPE ?= ./node_modules/.bin/tape
# DIRECTORIES #
ROOT_DIR := $(CURDIR)
LIB_DIR := $(ROOT_DIR)/lib
TEST_DIR := $(ROOT_DIR)/test
# FILES #
JS_FILES ?= $(shell find $(LIB_DIR) $(TEST_DIR) -name "*.js" -print)
TEST_FILES ?= $(shell find $(TEST_DIR) -name "*.js" -print)
# TARGETS #
.PHONY: all lint test clean
all: lint test
lint:
@echo "Running ESLint..."
@$(ESLINT) $(JS_FILES) || true
@echo "Linting complete."
test:
@echo "Running tests..."
@$(TAPE) $(TEST_FILES)
@echo "Tests complete."
clean:
@echo "Cleaning up..."
@rm -rf node_modules
@echo "Clean complete."