-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrakefile
More file actions
70 lines (65 loc) · 1.46 KB
/
rakefile
File metadata and controls
70 lines (65 loc) · 1.46 KB
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
# A simple build script for Meta2D.
#
# Instructions:
#
# (1) Install rake and python for your system.
#
# (2) Run 'rake' to generate the following files:
# ++ meta2d.js
# ++ docs/api/index.html
# ++ docs/api/all.html
#
# (3) Run 'rake clean' to remove all generated files.
# (load order matters)
sourcefiles = [
"signature.js",
"src/bind.js",
"src/meta2d.js",
"src/modify.js",
"src/math/affine.js",
"src/math/rect.js",
"src/math/vector.js",
"src/animation.js",
"src/mask.js",
"src/context.js",
"src/drawing.js",
"src/image.js",
"src/layer.js",
"src/lru.js",
"src/metacontext.js",
"src/projection.js",
"src/rcache.js",
"src/rtree.js",
"src/segment.js",
"src/tween.js",
"src/ui/button.js",
"src/ui/draggable.js",
"src/ui/progress.js",
"src/ui/selectable.js",
"src/ui/text.js"
]
desc "Combine all javascript source files into a single file."
task :merge do
puts "Merging src/*.js into meta2d.js"
sh "cat " + sourcefiles.join(" ") + " > 'meta2d.js'"
puts "Done merging library."
puts ""
end
desc "Build the documentation."
task :document => [:merge] do
puts "Parsing comments to build HTML documentation..."
sh "cat 'meta2d.js' | ./doc.py"
puts "Done documenting."
puts ""
end
desc "Remove all generated files."
task :clean do
sh """
rm meta2d.js ;
rm docs/*.html ;
"""
end
desc "Generate Javascript library, build documentation."
task :default => [:merge, :document] do
puts "All done."
end