-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
67 lines (53 loc) · 1.55 KB
/
Rakefile
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
$LOAD_PATH.unshift File.expand_path('./lib', __dir__)
require "yarrow"
require "yard"
require "generator"
require "calyx/docs"
task :fictive do
fictive_path = "~/Projects/fictive/fictive-editor"
sh "cd #{fictive_path} && FICTIVE_PROJECT=#{Dir.pwd} npm start"
end
task :packages do
sh "git clone https://github.com/maetl/calyx packages/calyx-rb"
sh "git clone https://github.com/fictiveworks/calyx packages/calyx-js"
sh "git clone https://github.com/maetl/mementus packages/mementus-rb"
sh "git clone https://github.com/fictiveworks/mementus packages/mementus-js"
end
task :serve do
sh "yarrow-server"
end
task :sitegen do
generate_site
sh "cp -r assets/ docs/assets"
end
YARD::Templates::Engine.register_template_path("templates/yard")
# YARD::Rake::YardocTask.new do |t|
# t.name = :calyx_api_rb
# t.opts = ["--output-dir api", "--title 'Calyx API'"]
# t.files = ["packages/calyx-rb/lib/**/*.rb"]
# end
#
# YARD::Rake::YardocTask.new do |t|
# t.name = :mementus_api_rb
# t.files = ["packages/mementus-rb/lib/**/*.rb"]
# end
# :calyx_api_rb
# https://github.com/skatkov/rdoc-markdown
task :calyx_api_js do
# Convert JSDoc to Markdown
# npm install --save-dev jsdoc-to-markdown
sh "npm run build:calyx"
end
task :mementus_api_js do
sh "npm run build:mementus"
end
task :api_rb => [:calyx_api_rb, :mementus_api_rb]
task :api_js => [:calyx_api_js, :mementus_api_js]
task :api => [:api_rb, :api_js]
task :calyx_ui do
sh "npm run build:ui"
end
task :calyx_css do
sh "npm run build"
end
task :build => [:sitegen, :calyx_ui, :calyx_css]