-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build action_cable.js with Blade #25119
Conversation
@@ -1,3 +1,4 @@ | |||
#= export ActionCable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make blade a runtime requirement for anyone running out of a git clone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Unknown Sprockets directives are ignored so without Blade the default behavior applies (setting window.ActionCable
).
4fd41a0
to
18f234f
Compare
I updated Blade to output the build process and handle cleaning the dist path: $ bundle exec rake assets:compile
Building assets…
[removed] lib/assets/compiled/action_cable.js
[created] lib/assets/compiled/action_cable.js |
eventmachine (1.2.0.1) | ||
eventmachine (1.2.0.1-x64-mingw32) | ||
eventmachine (1.2.0.1-x86-mingw32) | ||
execjs (2.6.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javan I see some downgrades, are they intentional from blade? or the dropping of coffee-script versions, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These dependencies were all added recently in 61483b1 when Blade 0.5.1 was introduced. It turns out Thin (a dependency of Blade) doesn't work with event machine 1.2.0 so I backed away from it in javan/blade@62c8cb0. Blade also removed exact dependencies on coffee-script and sprockets to reduce conflicts with apps that have tighter requirements. So if we want specific versions, we should declare them.
18f234f
to
d12209c
Compare
Introduced in d6f2000 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task.
Backported in 45083d8 |
Build action_cable.js with Blade
Thanks, @rafaelfranca! Is it possible to release actioncable-5.0.1 independently (to fix #25649) or are the Rails gems always released together? |
They are always released together. If you see the rails.gemspec we ask for the same version of the subgems. https://github.com/rails/rails/blob/master/rails.gemspec#L28. If it is a critical fix we can do a full release early, but this is more something to @matthewd decide since he is the release manager of the next release. |
Cool. I don't think it's critical. |
action_cable.js
with Blade, which essentially uses the same Sprockets setup we had in the rake task. No need to duplicate.#= export
directive to replace the somewhat incomplete implementation/cc @maclover7 @jeremy