ember-cli-rails 0.12.3 → 0.13.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/CHANGELOG.md +6 -1
- data/README.md +38 -2
- data/lib/ember_cli/app.rb +8 -1
- data/lib/ember_cli/path_set.rb +7 -0
- data/lib/ember_cli/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89b0e32290ff43666d7f220c5cd91b0ea8fb6a544bd353f6a3f65d9c5daf9823
|
|
4
|
+
data.tar.gz: 20d38958d7e6efec4f53dcc36f0af29a00021402cef02247b157481cba158e1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e46c51bbd566dfdb337227ab884eab7d9a037fb8dc08ba1e4f970694ce0ef02eebe9f777683ef997efb638c0b0dafdad083507491f0831f2e67a4fa8ae4aef1
|
|
7
|
+
data.tar.gz: 58a951962724029db87ed4bf969e85bcef65babb964ffedc05a13c5093c0da31cce85a98724b41a38b4116b0b4fc94998d696aadd9da00cfc0c79da2742e1bb5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
0.13.0.beta1
|
|
2
2
|
------
|
|
3
3
|
|
|
4
|
+
* Support Ember applications generated with the Vite-based blueprint
|
|
5
|
+
(`ember-cli >= 6.8`), without `ember-cli-rails-addon`
|
|
6
|
+
* Require `ember-cli-rails-assets >= 0.8.0`, which adds Vite support to
|
|
7
|
+
`include_ember_script_tags`
|
|
8
|
+
|
|
4
9
|
0.12.3
|
|
5
10
|
------
|
|
6
11
|
|
data/README.md
CHANGED
|
@@ -90,7 +90,8 @@ EmberCli.configure do |c|
|
|
|
90
90
|
end
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Next,
|
|
93
|
+
Next, if your Ember application uses the classic (Broccoli-based) build
|
|
94
|
+
(generated with `ember-cli < 6.8`), install the [ember-cli-rails-addon][addon]:
|
|
94
95
|
|
|
95
96
|
```bash
|
|
96
97
|
$ cd path/to/frontend
|
|
@@ -111,6 +112,10 @@ For instance, if you're using the `0.6.x` version of the gem, specify
|
|
|
111
112
|
}
|
|
112
113
|
```
|
|
113
114
|
|
|
115
|
+
If your Ember application uses the Vite-based build (generated with
|
|
116
|
+
`ember-cli >= 6.8`), do **not** install the addon: it is incompatible with the
|
|
117
|
+
Vite-based build, and `ember-cli-rails` does not require it there.
|
|
118
|
+
|
|
114
119
|
[addon]: https://github.com/rondale-sc/ember-cli-rails-addon/
|
|
115
120
|
[semver]: http://semver.org/
|
|
116
121
|
|
|
@@ -171,6 +176,17 @@ suites, configure the `default` task to depend on both `spec` and `ember:test`.
|
|
|
171
176
|
task default: [:spec, "ember:test"]
|
|
172
177
|
```
|
|
173
178
|
|
|
179
|
+
**Vite-based applications**
|
|
180
|
+
|
|
181
|
+
When Rails is running in development mode, classic (Broccoli-based) Ember
|
|
182
|
+
applications are built with `ember build --watch`, so changes to the Ember
|
|
183
|
+
application are picked up automatically.
|
|
184
|
+
|
|
185
|
+
Vite-based Ember applications (generated with `ember-cli >= 6.8`) are instead
|
|
186
|
+
built once, synchronously, when they are first requested. To pick up changes
|
|
187
|
+
to the Ember application, restart the Rails server, or iterate on the Ember
|
|
188
|
+
application directly with its own development server (`npm start`).
|
|
189
|
+
|
|
174
190
|
## Deploy
|
|
175
191
|
|
|
176
192
|
When Rails is running in production mode, EmberCLI-Rails stops doing runtime
|
|
@@ -449,6 +465,13 @@ actively supported method of serving EmberCLI applications.
|
|
|
449
465
|
However, for the sake of backwards compatibility, `ember-cli-rails` supports
|
|
450
466
|
injecting the EmberCLI-generated assets into an existing Rails layout.
|
|
451
467
|
|
|
468
|
+
**Note:** for Vite-based applications (generated with `ember-cli >= 6.8`),
|
|
469
|
+
use `include_ember_script_tags` on its own. It emits everything the
|
|
470
|
+
application needs to boot — the configuration `<meta>` tag, the stylesheet
|
|
471
|
+
and `modulepreload` links, and the ES module script tags — extracted from
|
|
472
|
+
the generated `index.html`. `include_ember_stylesheet_tags` only supports
|
|
473
|
+
classic (Broccoli-based) applications.
|
|
474
|
+
|
|
452
475
|
Following the example above, configure the mounted EmberCLI application to be
|
|
453
476
|
served by a custom controller (`ApplicationController`, in this case).
|
|
454
477
|
|
|
@@ -654,7 +677,20 @@ if (environment === 'development') {
|
|
|
654
677
|
|
|
655
678
|
This project supports:
|
|
656
679
|
|
|
657
|
-
* EmberCLI versions `>= 1.13.13`
|
|
680
|
+
* EmberCLI versions `>= 1.13.13` using the classic (Broccoli-based) build,
|
|
681
|
+
together with [ember-cli-rails-addon][addon]
|
|
682
|
+
* EmberCLI versions `>= 6.8` using the Vite-based build, without the addon
|
|
683
|
+
|
|
684
|
+
The test suite currently exercises the `5.12.x` and `6.7.x` (classic) and
|
|
685
|
+
`7.0.x` (Vite) series.
|
|
686
|
+
|
|
687
|
+
Note the following limitations for Vite-based applications:
|
|
688
|
+
|
|
689
|
+
* `include_ember_script_tags` emits the full set of tags the application
|
|
690
|
+
needs to boot, stylesheets included; `include_ember_stylesheet_tags` is
|
|
691
|
+
classic-only and must not be called for Vite-based applications
|
|
692
|
+
* in development, the application is built synchronously on first request
|
|
693
|
+
instead of being rebuilt on file changes
|
|
658
694
|
|
|
659
695
|
## Ruby and Rails support
|
|
660
696
|
|
data/lib/ember_cli/app.rb
CHANGED
|
@@ -50,7 +50,14 @@ module EmberCli
|
|
|
50
50
|
def build
|
|
51
51
|
unless EmberCli.skip?
|
|
52
52
|
if development?
|
|
53
|
-
|
|
53
|
+
if paths.vite?
|
|
54
|
+
# The Vite-based blueprint (`ember-cli >= 6.8`) has no
|
|
55
|
+
# `ember-cli-rails-addon` to manage the build lock, so build
|
|
56
|
+
# synchronously instead of watching for changes.
|
|
57
|
+
compile
|
|
58
|
+
else
|
|
59
|
+
build_and_watch
|
|
60
|
+
end
|
|
54
61
|
elsif test?
|
|
55
62
|
compile
|
|
56
63
|
end
|
data/lib/ember_cli/path_set.rb
CHANGED
|
@@ -39,6 +39,13 @@ module EmberCli
|
|
|
39
39
|
root.join("bower.json")
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
# Apps generated with the Vite-based blueprint (`ember-cli >= 6.8`)
|
|
43
|
+
# ship a Vite config file at their root.
|
|
44
|
+
def vite?
|
|
45
|
+
%w[vite.config.mjs vite.config.js vite.config.ts].
|
|
46
|
+
any? { |config| root.join(config).exist? }
|
|
47
|
+
end
|
|
48
|
+
|
|
42
49
|
def ember
|
|
43
50
|
@ember ||= begin
|
|
44
51
|
root.join("node_modules", "ember-cli", "bin", "ember").tap do |path|
|
data/lib/ember_cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ember-cli-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.13.0.beta1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Pravosud
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - ">="
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.
|
|
21
|
+
version: 0.8.0
|
|
22
22
|
- - "<"
|
|
23
23
|
- !ruby/object:Gem::Version
|
|
24
24
|
version: '1.0'
|
|
@@ -28,7 +28,7 @@ dependencies:
|
|
|
28
28
|
requirements:
|
|
29
29
|
- - ">="
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version: 0.
|
|
31
|
+
version: 0.8.0
|
|
32
32
|
- - "<"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
34
|
version: '1.0'
|
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
214
214
|
- !ruby/object:Gem::Version
|
|
215
215
|
version: '0'
|
|
216
216
|
requirements: []
|
|
217
|
-
rubygems_version: 4.0.
|
|
217
|
+
rubygems_version: 4.0.16
|
|
218
218
|
specification_version: 4
|
|
219
219
|
summary: Integration between Ember CLI and Rails
|
|
220
220
|
test_files: []
|