lib/metanorma/cli/collection.rb in metanorma-cli-1.6.1 vs lib/metanorma/cli/collection.rb in metanorma-cli-1.6.2.pre

- old
+ new

@@ -24,14 +24,18 @@ def collection_file @collection_file ||= Metanorma::Collection.parse(file) end + def source_folder + @source_folder ||= File.dirname(File.expand_path(file)) + end + def collection_options - { + @collection_options ||= { compile: @compile_options, coverpage: options.fetch(:coverpage, nil), - output_folder: options.fetch(:output_folder, nil), + output_folder: options.fetch(:output_folder, source_folder), format: collection_output_formats(options.fetch(:format, "")), } end def collection_output_formats(formats)