nanoc-live 1.0.0b8 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +26 -8
- data/README.md +1 -3
- data/lib/nanoc/live/command_runners/live.rb +1 -1
- data/lib/nanoc/live/commands/live.rb +6 -5
- data/lib/nanoc/live/live_recompiler.rb +18 -13
- data/lib/nanoc/live/version.rb +1 -1
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdd06ace4f84418061436ecd4cb14108e8c8417acabcb1bd7a3b2dafcc9f072e
|
4
|
+
data.tar.gz: 5428c0a98895092725ee6a4e8112f27a47c36b84a9fba38a46f108e05789659a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19ea055dd88b544fd175f19284845e7d01f3099c806eaf2ce2d446e7f6cfafa6025e80228fcdba65811c8ffff1cdb4ceb0e1e617b27e85a6ac0256a442c559db
|
7
|
+
data.tar.gz: 67e3a25c8c4ede6e8317f24c8cf4e3e2047206f4f920d748e7163dadbe0f31119ec06bdd3bc3e224fb7d7b6990e6d01fc3359b47e8378afcbeff211bf6c318f3
|
data/NEWS.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Release notes for nanoc-live
|
2
2
|
|
3
|
+
## 1.1.0 (2024-06-26)
|
4
|
+
|
5
|
+
Enhancements:
|
6
|
+
|
7
|
+
- Added `--focus` option to the `compile` and `live` commands (#1707)
|
8
|
+
|
9
|
+
Fixes:
|
10
|
+
|
11
|
+
- Fixed wrong documentation regarding listening IP addresses (#1584) [Jan M. Faber]
|
12
|
+
|
13
|
+
Changes:
|
14
|
+
|
15
|
+
- Dropped support for Ruby 3.0 (EOL) (#1704)
|
16
|
+
|
17
|
+
## 1.0.0 (2021-02-20)
|
18
|
+
|
19
|
+
Idential to 1.0.0b8.
|
20
|
+
|
3
21
|
## 1.0.0b8 (2021-01-16)
|
4
22
|
|
5
23
|
Fixes:
|
@@ -16,44 +34,44 @@ Enhancements:
|
|
16
34
|
|
17
35
|
Fixes:
|
18
36
|
|
19
|
-
|
37
|
+
- Restored compatibility with Nanoc 4.11.14.
|
20
38
|
|
21
39
|
## 1.0.0b5 (2019-11-16)
|
22
40
|
|
23
41
|
Fixes:
|
24
42
|
|
25
|
-
|
43
|
+
- Restored compatibility with Nanoc 4.11.13.
|
26
44
|
|
27
45
|
## 1.0.0b4 (2019-04-30)
|
28
46
|
|
29
47
|
Fixes:
|
30
48
|
|
31
|
-
|
49
|
+
- Restored compatibility with most recent version of Nanoc.
|
32
50
|
|
33
51
|
## 1.0.0b3 (2018-08-31)
|
34
52
|
|
35
53
|
Fixes:
|
36
54
|
|
37
|
-
|
55
|
+
- Fixed issue which required all command-line options to be specified
|
38
56
|
|
39
57
|
## 1.0.0b2 (2018-06-10)
|
40
58
|
|
41
59
|
Fixes:
|
42
60
|
|
43
|
-
|
61
|
+
- Fixed issues that could cause nanoc-live to keep running in the background, using more and more memory and CPU
|
44
62
|
|
45
63
|
## 1.0.0b1 (2018-01-07)
|
46
64
|
|
47
65
|
Changes:
|
48
66
|
|
49
|
-
|
67
|
+
- Removed `--live-reload` (always enabled) (#1291)
|
50
68
|
|
51
69
|
## 1.0.0a2 (2017-12-09)
|
52
70
|
|
53
71
|
Fixes:
|
54
72
|
|
55
|
-
|
56
|
-
|
73
|
+
- Added missing dependency on `adsf-live`
|
74
|
+
- Fixed errors not being printed (#1271)
|
57
75
|
|
58
76
|
## 1.0.0a1 (2017-12-03)
|
59
77
|
|
data/README.md
CHANGED
@@ -4,13 +4,14 @@ usage 'live'
|
|
4
4
|
summary 'auto-recompile and serve'
|
5
5
|
description <<~EOS
|
6
6
|
Starts the live recompiler along with the static web server. Unless specified,
|
7
|
-
the web server will run on port 3000 and listen on
|
8
|
-
|
7
|
+
the web server will run on port 3000 and listen on 127.0.0.1. Running this
|
8
|
+
static web server requires `adsf` (not `asdf`!).
|
9
9
|
EOS
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
option :H, :handler, 'specify the handler to use (webrick/puma/...)', argument: :required
|
12
|
+
option :o, :host, 'specify the host to listen on', default: '127.0.0.1', argument: :required
|
13
|
+
option :p, :port, 'specify the port to listen on', transform: Nanoc::CLI::Transform::Port, default: 3000, argument: :required
|
14
|
+
option nil, :focus, 'compile only items matching the given pattern', argument: :required, multiple: true
|
14
15
|
no_params
|
15
16
|
|
16
17
|
runner Nanoc::Live::CommandRunners::Live
|
@@ -3,13 +3,14 @@
|
|
3
3
|
module Nanoc
|
4
4
|
module Live
|
5
5
|
class LiveRecompiler
|
6
|
-
def initialize(command_runner:)
|
6
|
+
def initialize(command_runner:, focus:)
|
7
7
|
@command_runner = command_runner
|
8
|
+
@focus = focus
|
8
9
|
end
|
9
10
|
|
10
11
|
def run
|
11
12
|
run_parent do |site|
|
12
|
-
handle_changes(site, @command_runner)
|
13
|
+
handle_changes(site, @command_runner, focus: @focus)
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
@@ -60,10 +61,10 @@ module Nanoc
|
|
60
61
|
exit 0
|
61
62
|
end
|
62
63
|
|
63
|
-
def run_parent
|
64
|
+
def run_parent(&block)
|
64
65
|
# create initial child
|
65
66
|
pipe_read, pipe_write = IO.pipe
|
66
|
-
fork { run_child(pipe_write, pipe_read
|
67
|
+
fork { run_child(pipe_write, pipe_read, &block) }
|
67
68
|
pipe_read.close
|
68
69
|
|
69
70
|
changes = gen_lib_changes
|
@@ -76,27 +77,27 @@ module Nanoc
|
|
76
77
|
|
77
78
|
# create new child
|
78
79
|
pipe_read, pipe_write = IO.pipe
|
79
|
-
fork { run_child(pipe_write, pipe_read
|
80
|
+
fork { run_child(pipe_write, pipe_read, &block) }
|
80
81
|
pipe_read.close
|
81
82
|
end
|
82
83
|
rescue Interrupt
|
83
84
|
end
|
84
85
|
|
85
|
-
def handle_changes(site, command_runner)
|
86
|
+
def handle_changes(site, command_runner, focus:)
|
86
87
|
Nanoc::CLI::ErrorHandler.handle_while(exit_on_error: false) do
|
87
|
-
unsafe_handle_changes(site, command_runner)
|
88
|
+
unsafe_handle_changes(site, command_runner, focus:)
|
88
89
|
end
|
89
90
|
end
|
90
91
|
|
91
|
-
def unsafe_handle_changes(site, command_runner)
|
92
|
+
def unsafe_handle_changes(site, command_runner, focus:)
|
92
93
|
time_before = Time.now
|
93
94
|
|
94
95
|
puts 'Compiling site…'
|
95
|
-
compiler = Nanoc::Core::Compiler.new_for(site)
|
96
|
+
compiler = Nanoc::Core::Compiler.new_for(site, focus:)
|
96
97
|
listener = Nanoc::CLI::CompileListeners::Aggregate.new(
|
97
|
-
command_runner
|
98
|
-
site
|
99
|
-
compiler
|
98
|
+
command_runner:,
|
99
|
+
site:,
|
100
|
+
compiler:,
|
100
101
|
)
|
101
102
|
listener.run_while do
|
102
103
|
compiler.run_until_end
|
@@ -104,6 +105,10 @@ module Nanoc
|
|
104
105
|
|
105
106
|
time_after = Time.now
|
106
107
|
puts "Site compiled in #{format('%.2f', time_after - time_before)}s."
|
108
|
+
if focus
|
109
|
+
warn 'CAUTION: A --focus option is specified. Not the entire site has been compiled.'
|
110
|
+
warn 'Re-run without --focus to compile the entire site.'
|
111
|
+
end
|
107
112
|
puts
|
108
113
|
end
|
109
114
|
|
@@ -119,7 +124,7 @@ module Nanoc
|
|
119
124
|
Nanoc::Core::ChangesStream.new do |cl|
|
120
125
|
only = /(\/|\A)(nanoc\.yaml|config\.yaml|rules|Rules|rules\.rb|Rules\.rb)\z/
|
121
126
|
|
122
|
-
listener = Listen.to('.', only:
|
127
|
+
listener = Listen.to('.', only:) { |*| cl.unknown }
|
123
128
|
listener.start
|
124
129
|
sleep
|
125
130
|
end
|
data/lib/nanoc/live/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-live
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: adsf-live
|
@@ -91,10 +91,12 @@ files:
|
|
91
91
|
- lib/nanoc/live/commands/live.rb
|
92
92
|
- lib/nanoc/live/live_recompiler.rb
|
93
93
|
- lib/nanoc/live/version.rb
|
94
|
-
homepage: https://nanoc.
|
94
|
+
homepage: https://nanoc.app/
|
95
95
|
licenses:
|
96
96
|
- MIT
|
97
|
-
metadata:
|
97
|
+
metadata:
|
98
|
+
rubygems_mfa_required: 'true'
|
99
|
+
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-live-v1.1.0/nanoc-live
|
98
100
|
post_install_message:
|
99
101
|
rdoc_options: []
|
100
102
|
require_paths:
|
@@ -103,14 +105,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
105
|
requirements:
|
104
106
|
- - ">="
|
105
107
|
- !ruby/object:Gem::Version
|
106
|
-
version: '
|
108
|
+
version: '3.1'
|
107
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
110
|
requirements:
|
109
|
-
- - "
|
111
|
+
- - ">="
|
110
112
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
113
|
+
version: '0'
|
112
114
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
115
|
+
rubygems_version: 3.5.11
|
114
116
|
signing_key:
|
115
117
|
specification_version: 4
|
116
118
|
summary: Live recompilation support for Nanoc
|