Skip to content

Commit

Permalink
Add task for generating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Apr 6, 2015
1 parent 71c59f7 commit 74721b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/pkg
/Gemfile.lock
/tmp
/docs
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gemspec

gem 'rake'
gem 'rake-compiler'
gem 'sdoc'

group :test do
gem 'minitest', '~> 5.2'
Expand Down
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'bundler/setup'
require 'rake/extensiontask'
require 'rdoc/task'
require 'sdoc'

$gemspec = Gem::Specification.load('duktape.gemspec')

Expand All @@ -23,6 +25,13 @@ end
Gem::PackageTask.new($gemspec) do |pkg|
end

RDoc::Task.new(:docs) do |rd|
rd.main = "README.md"
rd.rdoc_files.include("README.md", "ext/duktape/duktape_ext.c")
rd.options << '--fmt' << 'sdoc'
rd.rdoc_dir = 'docs'
end

task :test => :compile do
ruby 'test/test_duktape.rb'
end
Expand Down

0 comments on commit 74721b8

Please sign in to comment.