Rakefile in opal-0.3.17 vs Rakefile in opal-0.3.18
- old
+ new
@@ -11,12 +11,13 @@
o.write Opal::Builder.runtime
end
end
Opal::BuilderTask.new do |t|
- t.name = 'opal'
- t.files = []
+ t.name = 'opal'
+ t.files = []
+ t.specs_dir = './core/spec'
t.dependencies = %w[opal-spec opal-racc opal-strscan]
end
desc "Check file sizes for opal.js runtime"
task :sizes do
@@ -76,26 +77,28 @@
sh 'git checkout gh-pages'
end
end
end
- task :index do
+ task :build do
require 'redcarpet'
require 'albino'
klass = Class.new(Redcarpet::Render::HTML) do
def block_code(code, language)
Albino.new(code, language || :text).colorize
end
end
markdown = Redcarpet::Markdown.new(klass, :fenced_code_blocks => true)
+ sources = %w[index]
- File.open('gh-pages/index.html', 'w+') do |o|
- o.write File.read('docs/pre.html')
- o.write markdown.render(File.read 'docs/index.md')
- o.write markdown.render(File.read 'CHANGELOG.md')
- o.write File.read('docs/post.html')
+ sources.each do |s|
+ File.open(File.join('gh-pages', "#{s}.html"), 'w+') do |o|
+ o.write File.read('docs/pre.html')
+ o.write markdown.render(File.read "docs/#{s}.md")
+ o.write File.read('docs/post.html')
+ end
end
end
task :copy do
FileUtils.cp 'build/opal.js', 'gh-pages/opal.js'
\ No newline at end of file