klenod-build 0.0.28 → 0.0.29
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9dbc1f6baef3ea6249edc7d68f1d8725234384d45c3f00dcf1b4ebba50eb8cbe
|
|
4
|
+
data.tar.gz: ee110cebfd420f402a67c922b2dcb1fa8cb9f8dffe768e4d5ced389ae6110f49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cae3766524cc6f31a74420abed1f8eaec845204f2465dfc1b48b9ff0f6ad7695dbc648a7394e58940338d1f8ce052beee3cb6cef7fc7c97ec18510f6badd85f6
|
|
7
|
+
data.tar.gz: 6a4230dcc4503ff87c4974f9cbd8065cc8348f66ca54f47a6f44e8419367b0901a0562e1dc0bd8bc633cf7d86fae621b4171b63e07b716f887d93b71e3d44e5a
|
data/lib/klenod/build/context.rb
CHANGED
|
@@ -88,6 +88,10 @@ module Klenod
|
|
|
88
88
|
|
|
89
89
|
DEFAULT_PLUGINS = DefaultPlugins.new.freeze
|
|
90
90
|
|
|
91
|
+
# `:development` collects, evaluates, and reloads on demand. `:build`
|
|
92
|
+
# only collects, for writing a bundle; `klenod build` always uses it.
|
|
93
|
+
MODES = %i[development build].freeze
|
|
94
|
+
|
|
91
95
|
def self.default_plugins
|
|
92
96
|
[
|
|
93
97
|
Plugins::RubyPlugin.new,
|
|
@@ -116,6 +120,12 @@ module Klenod
|
|
|
116
120
|
namespace: Module.new,
|
|
117
121
|
analysis: false
|
|
118
122
|
)
|
|
123
|
+
# Plugins compare the mode with `==`, so an unknown one would quietly
|
|
124
|
+
# behave like neither, e.g. CSS that is not minified.
|
|
125
|
+
unless MODES.include?(mode)
|
|
126
|
+
raise ArgumentError, "Unknown mode #{mode.inspect}; expected one of #{MODES.map(&:inspect).join(", ")}"
|
|
127
|
+
end
|
|
128
|
+
|
|
119
129
|
@source_dir = source_dir
|
|
120
130
|
plugins = plugins.to_a if plugins.equal?(DEFAULT_PLUGINS)
|
|
121
131
|
@plugins = plugins
|
|
@@ -223,7 +223,11 @@ module Klenod
|
|
|
223
223
|
:failed
|
|
224
224
|
)
|
|
225
225
|
)
|
|
226
|
-
|
|
226
|
+
# Only an evaluated module needs the placeholder, so demand raises the
|
|
227
|
+
# error instead of serving stale exports. The failed record already
|
|
228
|
+
# covers a collected-only module, and a placeholder would make the
|
|
229
|
+
# next update treat it as evaluated and run its code.
|
|
230
|
+
mods[module_id] = FailedModule.new(error) if mods.key?(module_id)
|
|
227
231
|
end
|
|
228
232
|
|
|
229
233
|
def diff_assets(previous_assets, current_assets)
|
|
@@ -494,6 +494,9 @@ module Klenod
|
|
|
494
494
|
kind, prefix, pattern = VARIABLE_TOKEN_KINDS[type]
|
|
495
495
|
receiver = @variables[kind]
|
|
496
496
|
next unless receiver
|
|
497
|
+
# `:@name` names the variable rather than reading it, as in
|
|
498
|
+
# `instance_variable_get(:@name)`.
|
|
499
|
+
next if tokens[index - 1]&.fetch(1) == :on_symbeg
|
|
497
500
|
|
|
498
501
|
# Parenthesize the receiver so a low-precedence expression
|
|
499
502
|
# such as `a || b` stays one operand, e.g. in `$*.fetch(:x)`.
|
data/lib/klenod/build/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: klenod-build
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrés Alin
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.0.
|
|
18
|
+
version: 0.0.29
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.0.
|
|
25
|
+
version: 0.0.29
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: async
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|