Sha256: 55e880d18687ebf8b9853752ddc76cd8d24fda6660491b647749a394b08df388
Contents?: true
Size: 801 Bytes
Versions: 2
Compression:
Stored size: 801 Bytes
Contents
require "pathname" require "metanorma/cli/site_generator" module Metanorma module Cli module Commands class Site < Thor desc "site generate SOURCE_PATH", "Geneate site from collection" option :config, aliases: "-c", desc: "The metanorma configuration file" option( :output_dir, aliases: "-o", default: Pathname.new(Dir.pwd).join("site").to_s, desc: "Output directory for the generated site", ) def generate(source_path) Cli::SiteGenerator.generate(source_path, options.dup) UI.say("Site has been generated at #{options[:output_dir]}") rescue Cli::Errors::InvalidManifestFileError UI.error("Invalid data in: #{options[:config]}") end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
metanorma-cli-1.4.0 | lib/metanorma/cli/commands/site.rb |
metanorma-cli-1.4.0pre | lib/metanorma/cli/commands/site.rb |