-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrakefile
53 lines (45 loc) · 1.34 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
require 'ftools'
begin
require 'rubygems'
require 'rake/gempackagetask'
rescue Exception
nil
end
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
desc 'Run implemented tests'
task :test do
system 'spec "test/lexical_parser_test.rb" "test/grammatical_parser_test.rb"'
end
begin
require 'darkfish-rdoc'
DARKFISH_ENABLED = true
rescue LoadError => ex
DARKFISH_ENABLED = false
end
BASE_RDOC_OPTIONS = [
'--line-numbers', '--inline-source',
'--main' , 'index',
'--title', 'RubyPiche -- Tools for Piche language'
]
task :index do
system 'sed "s/http:\/\/github.com\/danielhz\/ruby_piche\/raw\/master/link:files/g" README.rdoc > index'
end
rd = Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'html'
# rdoc.template = 'doc/jamis.rb'
rdoc.title = "RubyPiche -- Tools for Piche language"
rdoc.options = BASE_RDOC_OPTIONS.dup
rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
rdoc.options << '--charset' << 'utf-8'
rdoc.rdoc_files.include('index')
# rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
# rdoc.rdoc_files.exclude(/\bcontrib\b/)
end
task :doc => :rdoc do
File.copy('language_comparation.png', 'html/files/language_comparation.png')
File.copy('digraphs.png', 'html/files/digraphs.png')
File.delete 'index'
end