From b367c63186bad5fd96400ddeedc34bc7a2537710 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 7 Mar 2020 12:31:35 +0100 Subject: Add task for converting Readme to Markdown before publishing on npm --- Rakefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 46dd4bd..46842bf 100644 --- a/Rakefile +++ b/Rakefile @@ -23,6 +23,19 @@ rescue LoadError => e warn "#{e.path} is not available" end +task :readme2md do + require 'asciidoctor' + require 'pandoc-ruby' + + docbook = Asciidoctor + .load_file('README.adoc', header_footer: true, backend: 'docbook') + .convert + markdown = PandocRuby + .convert(docbook, from: :docbook, to: :markdown_github) + + File.write('README.md', markdown) +end + namespace :build do desc 'Transcompile to JavaScript using Opal' task :js do -- cgit v1.2.3