sitepress-cli 2.0.0.beta7 → 2.0.0.beta11
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 +18 -9
- data/sitepress-cli.gemspec +1 -0
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c350b577b21964034ccb08ec6aff5dcbf76eebf8ceac0da1c66b357287505797
|
|
4
|
+
data.tar.gz: 651ba479e59c454f4bfe61d06345f7cec1dce359b214e7b728a77534d5e3f41e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5c0e5c1a06e3cdf3d3f655459270fb46c035f25705f8dac8d058711c72cc5fa39389492d455cf70a7d1eda6912b285980618a62585384b37d3b0335c7995310
|
|
7
|
+
data.tar.gz: 6ab34a1eb9f8d12183a8aaea80df351c4224f631c42c513c26db4c6ead7290f9f434188e13b96793bb4ded7dc5eb4a3959c6f8bb077f038a3797841fd1e1afcf
|
data/lib/sitepress/cli.rb
CHANGED
|
@@ -16,8 +16,13 @@ module Sitepress
|
|
|
16
16
|
desc "server", "Run preview server"
|
|
17
17
|
def server
|
|
18
18
|
initialize!
|
|
19
|
+
# Enable Sitepress web error reporting so users have more friendly
|
|
20
|
+
# error messages instead of seeing a Rails exception.
|
|
21
|
+
controller.enable_sitepress_error_reporting = true
|
|
22
|
+
# Enable reloading the site between requests so we can see changes.
|
|
23
|
+
controller.enable_site_reloading = true
|
|
19
24
|
# This will use whatever server is found in the user's Gemfile.
|
|
20
|
-
Rack::Server.start app:
|
|
25
|
+
Rack::Server.start app: app,
|
|
21
26
|
Port: options.fetch("port"),
|
|
22
27
|
Host: options.fetch("bind_address")
|
|
23
28
|
end
|
|
@@ -26,12 +31,12 @@ module Sitepress
|
|
|
26
31
|
desc "compile", "Compile project into static pages"
|
|
27
32
|
def compile
|
|
28
33
|
initialize!
|
|
34
|
+
# Page compilation
|
|
35
|
+
logger.info "Sitepress compiling pages"
|
|
36
|
+
Compiler.new(site: configuration.site, root_path: options.fetch("output_path")).compile
|
|
29
37
|
# Sprockets compilation
|
|
30
38
|
logger.info "Sitepress compiling assets"
|
|
31
39
|
sprockets_manifest(target_path: options.fetch("output_path")).compile precompile_assets
|
|
32
|
-
# Page compilation
|
|
33
|
-
logger.info "Sitepress compiling pages"
|
|
34
|
-
compiler.compile target_path: options.fetch("output_path")
|
|
35
40
|
end
|
|
36
41
|
|
|
37
42
|
desc "console", "Interactive project shell"
|
|
@@ -63,10 +68,6 @@ module Sitepress
|
|
|
63
68
|
Sitepress.configuration
|
|
64
69
|
end
|
|
65
70
|
|
|
66
|
-
def compiler
|
|
67
|
-
Compiler.new(site: configuration.site)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
71
|
def sprockets_manifest(target_path: )
|
|
71
72
|
target_path = Pathname.new(target_path)
|
|
72
73
|
Sprockets::Manifest.new(rails.assets, target_path.join("assets/manifest.json")).tap do |manifest|
|
|
@@ -88,7 +89,15 @@ module Sitepress
|
|
|
88
89
|
|
|
89
90
|
def initialize!
|
|
90
91
|
require_relative "boot"
|
|
91
|
-
|
|
92
|
+
app.initialize!
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def controller
|
|
96
|
+
::SiteController
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def app
|
|
100
|
+
Sitepress::Server
|
|
92
101
|
end
|
|
93
102
|
end
|
|
94
103
|
end
|
data/sitepress-cli.gemspec
CHANGED
|
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.version = Sitepress::VERSION
|
|
9
9
|
spec.authors = ["Brad Gessler"]
|
|
10
10
|
spec.email = ["bradgessler@gmail.com"]
|
|
11
|
+
spec.licenses = ["MIT"]
|
|
11
12
|
|
|
12
13
|
spec.summary = %q{Sitepress command line interface and compilation tools for static site.}
|
|
13
14
|
spec.homepage = "https://github.com/sitepress/sitepress"
|
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: 2.0.0.
|
|
4
|
+
version: 2.0.0.beta11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brad Gessler
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sitepress-server
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.0.0.
|
|
19
|
+
version: 2.0.0.beta11
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.0.0.
|
|
26
|
+
version: 2.0.0.beta11
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: thor
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,7 +80,8 @@ files:
|
|
|
80
80
|
- templates/default/pages/favicon.ico
|
|
81
81
|
- templates/default/pages/index.html.erb
|
|
82
82
|
homepage: https://github.com/sitepress/sitepress
|
|
83
|
-
licenses:
|
|
83
|
+
licenses:
|
|
84
|
+
- MIT
|
|
84
85
|
metadata: {}
|
|
85
86
|
post_install_message:
|
|
86
87
|
rdoc_options: []
|
|
@@ -97,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
98
|
- !ruby/object:Gem::Version
|
|
98
99
|
version: 1.3.1
|
|
99
100
|
requirements: []
|
|
100
|
-
rubygems_version: 3.
|
|
101
|
+
rubygems_version: 3.2.3
|
|
101
102
|
signing_key:
|
|
102
103
|
specification_version: 4
|
|
103
104
|
summary: Sitepress command line interface and compilation tools for static site.
|