sitepress-cli 3.2.2 → 4.0.0.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sitepress/cli.rb +27 -5
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 997080538674d3f5d49b5e48e1696123d2045120824f3f0715f524720f8a0fad
|
|
4
|
+
data.tar.gz: 7dc51220785129d6809fbf8d404538b9474ccf63a2ed6315e4fb3082bc92293b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2022a514e0b1e18da249e39db415e0cf0d8bda50d0412d4bed3c5fb1b93d0026c29d8ca2a2850c45eb1870aee0be76aae77c079334462dc10d6bd5f16826bef
|
|
7
|
+
data.tar.gz: '08ee98dd20c0f9ff26f1f3361ec74f15ad137f13850496861d7d4240cf6422bc42dc979e2717fc94823850439b29c379774495b4e4573c865809461f827b05f5'
|
data/lib/sitepress/cli.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Sitepress
|
|
|
7
7
|
SERVER_PORT = 8080
|
|
8
8
|
|
|
9
9
|
# Default address is public to all IPs.
|
|
10
|
-
SERVER_BIND_ADDRESS = "
|
|
10
|
+
SERVER_BIND_ADDRESS = "127.0.0.1".freeze
|
|
11
11
|
|
|
12
12
|
# Default build path for compiler.
|
|
13
13
|
COMPILE_TARGET_PATH = "./build".freeze
|
|
@@ -48,15 +48,37 @@ module Sitepress
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
option :output_path, default: COMPILE_TARGET_PATH, type: :string
|
|
51
|
+
option :fail_on_error, default: false, type: :boolean
|
|
51
52
|
desc "compile", "Compile project into static pages"
|
|
52
53
|
def compile
|
|
53
54
|
initialize!
|
|
54
|
-
|
|
55
|
-
logger.info "Sitepress compiling pages"
|
|
56
|
-
Compiler.new(site: configuration.site, root_path: options.fetch("output_path")).compile
|
|
57
|
-
# Sprockets compilation
|
|
55
|
+
|
|
58
56
|
logger.info "Sitepress compiling assets"
|
|
59
57
|
sprockets_manifest(target_path: options.fetch("output_path")).compile precompile_assets
|
|
58
|
+
|
|
59
|
+
logger.info "Sitepress compiling pages"
|
|
60
|
+
compiler = Compiler::Files.new \
|
|
61
|
+
site: configuration.site,
|
|
62
|
+
root_path: options.fetch("output_path"),
|
|
63
|
+
fail_on_error: options.fetch("fail_on_error")
|
|
64
|
+
|
|
65
|
+
begin
|
|
66
|
+
compiler.compile
|
|
67
|
+
ensure
|
|
68
|
+
logger.info ""
|
|
69
|
+
logger.info "Compilation Summary"
|
|
70
|
+
logger.info " Build path: #{compiler.root_path.expand_path}"
|
|
71
|
+
logger.info " Succeeded: #{compiler.succeeded.count}"
|
|
72
|
+
logger.info " Failed: #{compiler.failed.count}"
|
|
73
|
+
if compiler.failed.any?
|
|
74
|
+
logger.info ""
|
|
75
|
+
logger.info "Failed Resources"
|
|
76
|
+
compiler.failed.each do |resource|
|
|
77
|
+
logger.info " #{resource.request_path} #{resource.asset.path}"
|
|
78
|
+
end
|
|
79
|
+
abort # We want a non-zero exit code so we can fail CI pipelines, etc.
|
|
80
|
+
end
|
|
81
|
+
end
|
|
60
82
|
end
|
|
61
83
|
|
|
62
84
|
desc "console", "Interactive project shell"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sitepress-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0.beta1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brad Gessler
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - '='
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 4.0.0.beta1
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - '='
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 4.0.0.beta1
|
|
55
55
|
description:
|
|
56
56
|
email:
|
|
57
57
|
- bradgessler@gmail.com
|
|
@@ -98,11 +98,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
98
98
|
version: '0'
|
|
99
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
|
-
- - "
|
|
101
|
+
- - ">"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
103
|
+
version: 1.3.1
|
|
104
104
|
requirements: []
|
|
105
|
-
rubygems_version: 3.4.
|
|
105
|
+
rubygems_version: 3.4.6
|
|
106
106
|
signing_key:
|
|
107
107
|
specification_version: 4
|
|
108
108
|
summary: Sitepress command line interface and compilation tools for static site.
|