opal-zeitwerk 0.2.0 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -11
- data/lib/opal/zeitwerk/version.rb +1 -1
- data/opal/zeitwerk/kernel.rb +1 -0
- data/opal/zeitwerk/loader.rb +736 -737
- metadata +10 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f43db827784953bf45307a6ff8e5822d7c3b7897b9df1eeb327268793370806f
|
4
|
+
data.tar.gz: 4355e1e99b85f76a6e86984088d404c81a51357fbb836ba66754445e09a5b2c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 214bd691d37e38e079875db63481e561dad464d2c78e510b40d6ed64bf3fe07f2c08b6c9f0768e1d0f143f3d953a24a1e2aa8f5246455b3025898ae44c8bfc6e
|
7
|
+
data.tar.gz: 31bc059526345a0d0d4a37ff8dafd8126760be260504dd2a75b68fa1ae53ed2a93644bfbc8a91e0786401f34adff050a5afdc26c6e5cd4d2620e5a2b6fb56c6c
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ Differences to Ruby Zeitwerk:
|
|
51
51
|
- no logging (to keep asset size small and performance high)
|
52
52
|
- no gem specific support: GemInflector, for_gem, etc.
|
53
53
|
|
54
|
-
These don't make so much sense, as Opal Zeitwerk works on the global Opal.modules registry in the Browser, not the filesystem.
|
54
|
+
These don't make so much sense, as Opal Zeitwerk works on the global Opal.modules registry in the Browser, not the filesystem.
|
55
55
|
- Zeitwerk::Loader.set_autoloads_in_dir is public, so it can be called from lazy loaded code, after updating Opal.modules.
|
56
56
|
- There are no threads in javascript so thread support has been removed.
|
57
57
|
- Tests don't run yet.
|
@@ -167,14 +167,10 @@ should define `Geolocatable`, not `Concerns::Geolocatable`.
|
|
167
167
|
<a id="markdown-usage" name="usage"></a>
|
168
168
|
## Usage
|
169
169
|
|
170
|
-
Currently autoloading requires the es6_modules_1_1 branch along with the Opal es6_modules compiler options enabled.
|
171
|
-
This option is enabled by default with using [opal-webpack-loader](https://github.com/isomorfeus/opal-webpack-loader) to bundle opal code.
|
172
|
-
|
173
170
|
Add to the Gemfile:
|
174
171
|
```
|
175
|
-
gem 'opal',
|
176
|
-
gem 'opal-
|
177
|
-
gem 'opal-zeitwerk', '~> 0.0.1'
|
172
|
+
gem 'opal', '>= 1.3.0'
|
173
|
+
gem 'opal-zeitwerk', '~> 0.2.3'
|
178
174
|
```
|
179
175
|
|
180
176
|
And to your loader of opal code:
|
@@ -186,7 +182,7 @@ require 'zeitwerk'
|
|
186
182
|
### Setup
|
187
183
|
Files must be included in the compiled asset by:
|
188
184
|
```
|
189
|
-
require_tree 'some_dir', :
|
185
|
+
require_tree 'some_dir', autoload: true
|
190
186
|
```
|
191
187
|
And added to the loader by:
|
192
188
|
```
|
@@ -451,10 +447,9 @@ As a workaround, you can eager load. Zeitwerk tries hard to succeed or fail cons
|
|
451
447
|
<a id="markdown-supported-opal-versions" name="supported-opal-versions"></a>
|
452
448
|
## Supported Opal versions
|
453
449
|
|
454
|
-
Opal Zeitwerk currently works
|
455
|
-
For the Gemfile:
|
450
|
+
Opal Zeitwerk currently works with Opal releases >= 1.3.0. For the Gemfile:
|
456
451
|
```
|
457
|
-
gem 'opal',
|
452
|
+
gem 'opal', '>= 1.3.0'
|
458
453
|
```
|
459
454
|
|
460
455
|
<a id="markdown-motivation" name="motivation"></a>
|
data/opal/zeitwerk/kernel.rb
CHANGED