-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
30 lines (22 loc) · 980 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
PAGES:=$(shell find pages -name "*.html")
ROOT:=$(shell if [ -d node_modules/prosemirror-model ]; then echo node_modules/; else echo ../node_modules/; fi)
all: $(PAGES:pages/%=public/%) \
public/js/fullpage.js \
public/js/startpage.js \
public/css/editor.css
public/%.html: pages/%.* templates/* lib/build.js
mkdir -p $(dir $@)
node lib/build.js $<
lib/build.js: src/build/*.js rollup.config.js
$(ROOT).bin/rollup -c
public/js/fullpage.js: src/collab/client/*.js rollup.config.js
$(ROOT).bin/rollup -c
public/js/startpage.js: src/collab/client/*.js rollup.config.js
$(ROOT).bin/rollup -c
public/css/editor.css: $(ROOT)prosemirror-view/style/prosemirror.css \
$(ROOT)prosemirror-menu/style/menu.css \
$(ROOT)prosemirror-example-setup/style/style.css \
public/css/editor-base.css
cat $^ > $@
clean:
rm public/*.html public/js/fullpage.js public/js/startpage.js public/css/editor.css