-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile
31 lines (20 loc) · 851 Bytes
/
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
PATH := ./node_modules/.bin:$(PATH)
#Recursive file search
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
# lib/**/*.styl
STYLUS_FILES := $(call rwildcard,lib/,*.styl)
# public/templates/**/*.jade
DOCS_TEMPLATES := $(call rwildcard,public/templates/,*.jade)
build: all
all: index.html public/css/main.min.css
clean:
rm index.html
rm public/css/main.css
rm public/css/main.min.css
index.html: $(DOCS_TEMPLATES)
./node_modules/.bin/jade -o . -P public/templates/index.jade
public/css/main.min.css: public/css/main.css
cssmin public/css/main.css > public/css/main.min.css
public/css/main.css: public/styl/main.styl $(STYLUS_FILES)
# Use the current module as it's own plugin, normally this would be -u yeticss
./node_modules/.bin/stylus -u ./ public/styl/main.styl -u autoprefixer-stylus -o public/css