This tool allows to precompile Slim templates into Ruby code and assemble them into a single-file pure Ruby converter (backend).
TODO
Installation
Add this line to your application’s Gemfile:
group :development do
gem 'asciidoctor-templates-compiler', '~> 0.1.2'
end
or to your gemspec:
s.add_development_dependency 'asciidoctor-templates-compiler', '~> 0.1.2'
and then execute:
$ bundle install
Usage
require 'asciidoctor-templates-compiler'
File.open('html_custom_converter.rb', 'w') do |file|
Asciidoctor::TemplatesCompiler::Slim.compile_converter(
templates_dir: 'data/templates',
class_name: 'HtmlCustomConverter',
delegate_backend: 'html5',
register_for: ['html-custom'],
backend_info: {
basebackend: 'html',
outfilesuffix: '.html',
filetype: 'html',
},
pretty: true,
output: file)
end
License
This project is licensed under MIT License. For the full text of the license, see the LICENSE file.