summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index bc86f92..54fd891 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,12 +32,15 @@ namespace :build do
dynamic_require_severity: :error,
})
builder.append_paths 'lib'
- builder.build 'asciidoctor-interdoc-reftext'
+ builder.build 'asciidoctor/interdoc_reftext'
out_file = 'js/asciidoctor-interdoc-reftext.js'
mkdir_p(File.dirname(out_file), verbose: false)
- File.binwrite out_file, builder.to_s
+ File.open(out_file, 'w') do |file|
+ template = File.read('src/asciidoctor-interdoc-reftext.tmpl.js')
+ file << template.sub('//OPAL-GENERATED-CODE//', builder.to_s)
+ end
File.binwrite "#{out_file}.map", builder.source_map
end
end