forked from balaclark/HTML5-Comic-Book-Reader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·52 lines (46 loc) · 1.94 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
#
# build package & update examples
#
build:
@echo "Running jshint..."
@./node_modules/.bin/jshint lib/ComicBook.js --config lib/.jshintrc
@echo "Compiling Handlebars templates..."
@./node_modules/.bin/handlebars templates/*.handlebars -f lib/templates.js
@echo "Compiling and minifying javascript..."
@mkdir -p comicbook/js/pixastic
@cat lib/vendor/pixastic/pixastic.js lib/vendor/pixastic/pixastic.effects.js lib/vendor/pixastic/pixastic.worker.js lib/vendor/handlebars.runtime-1.0.rc.1.min.js lib/templates.js lib/ComicBook.js > comicbook/js/comicbook.js
@cp lib/vendor/pixastic/pixastic.js comicbook/js/pixastic
@cp lib/vendor/pixastic/pixastic.effects.js comicbook/js/pixastic
@cp lib/vendor/pixastic/pixastic.worker.js comicbook/js/pixastic
@cp lib/vendor/pixastic/pixastic.worker.control.js comicbook/js/pixastic
@cp lib/vendor/pixastic/license-gpl-3.0.txt comicbook/js/pixastic
@cp lib/vendor/pixastic/license-mpl.txt comicbook/js/pixastic
@./node_modules/.bin/uglifyjs -nc comicbook/js/comicbook.js > comicbook/js/comicbook.min.js
@echo "Compiling CSS..."
@cat fonts/icomoon-toolbar/style.css css/reset.css css/styles.css css/toolbar.css > comicbook/comicbook.css
@echo "Copying assets..."
@cp -r css/img comicbook/img
@cp -r icons/1_Desktop_Icons/icon_128.png comicbook/img
@cp -r icons/1_Desktop_Icons/icon_196.png comicbook/img
@cp -r fonts/icomoon-toolbar/fonts comicbook
@cp -r fonts/icomoon-toolbar/license.txt comicbook/fonts
@echo "Updating examples"
@cp -r comicbook examples
@echo "Done"
#
# run jshint & quint tests
#
test:
@./node_modules/.bin/jshint lib/ComicBook.js --config lib/.jshintrc
@./node_modules/.bin/jshint lib/tests/unit/*.js --config lib/.jshintrc
@node lib/tests/server.js &
@./node_modules/.bin/phantomjs lib/tests/phantom.js "http://localhost:3000/lib/tests"
@kill -9 `cat lib/tests/pid.txt`
@rm lib/tests/pid.txt
#
# remove prior builds
#
clean:
@rm -r comicbook
@rm -r examples/comicbook
@rm lib/templates.js