metanorma-cli 1.6.11.pre.pre3 → 1.6.12.pre.pre
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8de4185bd9e1cad56241808c5a9a648e4622789e9882dc2161e1f48857787c18
|
4
|
+
data.tar.gz: 812694ed573cda8595265d14744ebda81cdbacecba9875efe5352a590d4828cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44308a7617185522ed48275cab56cfa9a2cb45c0754fdeb0d1c37813c3159cda7009336471736c684086a280d6e0338d9a10f195dbdcf20b14cee73b3f23c246
|
7
|
+
data.tar.gz: cd12a40f221292e3367ee79fe1ab71161d8558b310091cf2e6f32ffe0d05c8fcfda844ff19f964869b7747166548bf67145363bc5eac48bc9877832ad85e3a8e
|
@@ -36,6 +36,7 @@ module Metanorma
|
|
36
36
|
option :extract, aliases: "-e", desc: "Export sourcecode fragments from this document to nominated directory"
|
37
37
|
option :version, aliases: "-v", desc: "Print version of code (accompanied with -t)"
|
38
38
|
option :output_dir, aliases: "-o", desc: "Directory to save compiled files"
|
39
|
+
option :strict, aliases: "-S", type: :boolean, desc: "Strict compilation: abort if there are any errors"
|
39
40
|
option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
|
40
41
|
"presented (WARNING: do know what you are agreeing with!)"
|
41
42
|
option :no_install_fonts, type: :boolean, desc: "Skip the font installation process"
|
@@ -65,6 +66,8 @@ module Metanorma
|
|
65
66
|
"presented (WARNING: do know what you are agreeing with!)"
|
66
67
|
option :no_install_fonts, type: :boolean, desc: "Skip the font installation process"
|
67
68
|
option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
|
69
|
+
option :strict, aliases: "-S", type: :boolean, \
|
70
|
+
desc: "Strict compilation: abort if there are any errors"
|
68
71
|
|
69
72
|
def collection(filename = nil)
|
70
73
|
if filename
|
@@ -12,7 +12,7 @@ module Metanorma
|
|
12
12
|
:output_dir,
|
13
13
|
aliases: "-o",
|
14
14
|
default: Pathname.new(Dir.pwd).join("site").to_s,
|
15
|
-
desc: "Output directory for generated site"
|
15
|
+
desc: "Output directory for generated site",
|
16
16
|
)
|
17
17
|
option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
|
18
18
|
"presented (WARNING: do know what you are agreeing with!)"
|
@@ -20,9 +20,19 @@ module Metanorma
|
|
20
20
|
option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
|
21
21
|
option :stylesheet, alias: "-s", desc: "Stylesheet file path for rendering HTML page"
|
22
22
|
option :template_dir, alias: "-t", desc: "Liquid template directory to render site design"
|
23
|
+
option(
|
24
|
+
:strict,
|
25
|
+
aliases: "-S",
|
26
|
+
type: :boolean,
|
27
|
+
desc: "Strict compilation: abort if there are any errors",
|
28
|
+
)
|
23
29
|
|
24
30
|
def generate(source_path = Dir.pwd)
|
25
|
-
Cli::SiteGenerator.generate(
|
31
|
+
Cli::SiteGenerator.generate(
|
32
|
+
source_path,
|
33
|
+
options,
|
34
|
+
filter_compile_options(options),
|
35
|
+
)
|
26
36
|
UI.say("Site has been generated at #{options[:output_dir]}")
|
27
37
|
rescue Cli::Errors::InvalidManifestFileError
|
28
38
|
UI.error("Invalid data in: #{options[:config]}")
|
@@ -1,8 +1,6 @@
|
|
1
1
|
require "thor"
|
2
2
|
require "metanorma-utils"
|
3
3
|
|
4
|
-
#require_relative "stringify_all_keys"
|
5
|
-
|
6
4
|
module Metanorma
|
7
5
|
module Cli
|
8
6
|
class ThorWithConfig < Thor
|
@@ -13,14 +11,19 @@ module Metanorma
|
|
13
11
|
def options
|
14
12
|
original_options = super.to_hash.symbolize_all_keys
|
15
13
|
Thor::CoreExt::HashWithIndifferentAccess.new(
|
16
|
-
Metanorma::Cli::Commands::Config.load_configs(original_options)
|
14
|
+
Metanorma::Cli::Commands::Config.load_configs(original_options),
|
17
15
|
)
|
18
16
|
end
|
19
17
|
|
20
18
|
def filter_compile_options(options)
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
copts = %w[
|
20
|
+
agree_to_terms
|
21
|
+
no_install_fonts
|
22
|
+
continue_without_fonts
|
23
|
+
no_progress
|
24
|
+
strict
|
25
|
+
]
|
26
|
+
options.select { |k, _| copts.include?(k) }.symbolize_all_keys
|
24
27
|
end
|
25
28
|
end
|
26
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.12.pre.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|