forked from dart-archive/www.dartlang.org
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
66 lines (49 loc) · 2 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
CURRENT_BRANCH=$(shell git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
PWD=$(shell pwd)
clean:
rm -rf ./build
build: copy add_version
compass:
compass compile src/site/
copy: clean compass
cd ./src/site && jekyll build && cd ../.. && cp -R ./src/appengine/* build/
add_version:
ruby -p -i -e '$$_.gsub!(/CHANGEME/, "$(CURRENT_BRANCH)")' ./build/app.yaml
deploy: build
cd ./build && appcfg.py --oauth2 update .
@echo "Visit http://$(CURRENT_BRANCH).dart-lang.appspot.com"
server:
@open http://localhost:8081/ && cd ./src/site && jekyll serve -w --port=8081 --trace
optimize:
@find . -iname *.png | xargs -L 1 optipng -o7
o2:
@find . -iname *.png | xargs -L 1 optipng -o2
dartisansplaylist:
dart scripts/gen_dartisans_playlist.dart
darttips:
cd scripts && dart gen_dart_tips.dart
convert-docbook-to-html:
ifndef BOOK_XML_DIR
@echo "You must specify the location of the .xml files. Example: \n make book BOOK_XML_DIR=~/Spot/dartbook/SVN \nSkipping docbook-to-html conversion."
else
cd $(BOOK_XML_DIR) ; \
xsltproc --xinclude \
--stringparam base.dir $(PWD)/_bookhtml/ \
--stringparam use.id.as.filename 1 \
--stringparam chunk.first.sections 1 \
--stringparam chunker.output.encoding UTF-8 \
$(PWD)/third_party/docbook-xsl-1.78.0/html/chunk.xsl book.xml
endif
convert-book-html-to-jekyll: convert-docbook-to-html
dart scripts/convert_book.dart _bookhtml src/site/docs/dart-up-and-running/contents
copy-book-images:
ifndef BOOK_XML_DIR
@echo "You must specify the location of the .xml files. Example: \n make book BOOK_XML_DIR=~/Spot/dartbook/SVN \nSkipping copy-book-images."
else
mkdir -p src/site/docs/dart-up-and-running/contents/figs/web
cp -R $(BOOK_XML_DIR)/figs/web/*.gif $(BOOK_XML_DIR)/figs/web/*.png src/site/docs/dart-up-and-running/contents/figs/web
endif
book: copy-book-images convert-book-html-to-jekyll
compile-sample-apps: observables-samples
observables-samples:
cd src/site/web-ui/observables/code && pub install && dart build.dart