forked from plone/mockup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (54 loc) · 1.62 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
62
63
64
65
66
67
68
69
70
NIX_PATH = $(HOME)/.nix-defexpr/channels/
NIX := $(shell which nix-build | egrep '^/' | head -1)
UNAME := $(shell uname)
GIT = git
NPM = npm
ifdef NIX
GRUNT = ./nixenv/bin/grunt
BOWER = ./nixenv/bin/bower
else
GRUNT = ./node_modules/.bin/grunt
BOWER = ./node_modules/.bin/bower
endif
all: compile jshint test-ci docs
compile: compile-widgets compile-toolbar
# ----------------------------------------------------------------------- #
# cp build/widgets* path/to/plone.app.widgets/plone/app/widgets/static #
# cp build/toolbar* path/to/plone.app.toolbar/plone/app/toolbar/static #
# ----------------------------------------------------------------------- #
compile-widgets:
mkdir -p build
$(GRUNT) compile-widgets
compile-toolbar:
mkdir -p build
$(GRUNT) compile-toolbar
bootstrap: clean
mkdir -p build
if test ! -d docs; then $(GIT) clone git://github.com/plone/mockup.git -b gh-pages docs; fi
ifdef NIX
NIX_PATH=${NIX_PATH} nix-build --out-link nixenv dev.nix
ln -s ./nixenv/lib/node_modules ./
else
$(NPM) link --prefix=./node_modules
$(GRUNT) sed:bootstrap
endif
$(BOWER) install
jshint:
$(GRUNT) jshint
test: jshint
NODE_PATH=./node_modules $(GRUNT) karma:dev --force --pattern=$(pattern)
test-chrome:
NODE_PATH=./node_modules $(GRUNT) karma:dev_chrome --force --pattern=$(pattern)
test-ci: jshint
NODE_PATH=./node_modules $(GRUNT) karma:ci --force
docs:
mkdir -p docs/dev/lib/tinymce
$(GRUNT) docs
clean:
mkdir -p build
rm -rf build
rm -rf node_modules
rm -rf bower_components
clean-all: clean
if test -f $(BOWER); then $(BOWER) cache clean; fi
.PHONY: compile bootstrap jshint test test-ci docs clean