Make Webpacker the default JavaScript compiler for Rails 6#33079
Merged
Make Webpacker the default JavaScript compiler for Rails 6#33079
Conversation
added 12 commits
June 7, 2018 14:58
…ramework setup now
added 5 commits
June 7, 2018 18:04
Need some work on how to set the global consumer that channels will work with. @javan?
yhirano55
reviewed
Jun 7, 2018
| else | ||
| GemfileEntry.new "mini_racer", nil, comment, { platforms: :ruby }, true | ||
| [ GemfileEntry.version("turbolinks", "~> 5", | ||
| "Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks") ] |
Contributor
There was a problem hiding this comment.
Turbolinks is added on package.json, so it looks unnecessary to add turbolinks to Gemfile.
Contributor
There was a problem hiding this comment.
I see. Thanks. https://github.com/turbolinks/turbolinks-rails
Member
Author
|
There’s a Ruby and a JS component. Both are needed.
… On Jun 7, 2018, at 23:23, yhirano55 ***@***.***> wrote:
@yhirano55 commented on this pull request.
In railties/lib/rails/generators/app_base.rb:
> - end
-
- gems
- end
- end
-
- def javascript_runtime_gemfile_entry
- comment = "See https://github.com/rails/execjs#readme for more supported runtimes"
- if defined?(JRUBY_VERSION)
- GemfileEntry.version "therubyrhino", nil, comment
- elsif RUBY_PLATFORM =~ /mingw|mswin/
- GemfileEntry.version "duktape", nil, comment
- else
- GemfileEntry.new "mini_racer", nil, comment, { platforms: :ruby }, true
+ [ GemfileEntry.version("turbolinks", "~> 5",
+ "Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks") ]
Turbolinks is added on package.json, so it looks unnecessary to add turbolinks to Gemfile.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Member
Author
|
Because JavaScript is a language, not a classification of a domain type,
like controllers or views or models. JavaScript has all those things.
Saying "JavaScripts" imply that it's a collection of isolated, independent
files, when it's not. It's the part of the application written in
JavaScript.
…On Fri, Jun 15, 2018 at 6:18 PM, Rainer Borene ***@***.***> wrote:
@dhh <https://github.com/dhh> any reason to keep the javascript folder
name in singular? why not following the pattern of plural name like
controllers, models and views?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33079 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAKtdNf_Y4N_9wLEZE3ZnZR08tvrNhiks5t895pgaJpZM4UegdM>
.
|
Contributor
|
@dhh that means that sprockets will no longer be a dependency on Rails? |
Member
Author
|
No, Sprockets is still to be used for SCSS (and other CSS processors) as
well as copying all other static assets.
…On Mon, Jun 25, 2018 at 3:25 PM, Rainer Borene ***@***.***> wrote:
@dhh <https://github.com/dhh> that means that sprockets will no longer be
a dependency on Rails?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33079 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAKtUSOtzstvc81TfoLi1IQVNJijU_Zks5uAOTngaJpZM4UegdM>
.
|
|
@dhh keeping my eyes peeled for the promised new JS framework for Rails 6.0 reveal! (Haven't found anything satisfying so far with either React, or Stimulus or Ember - hope its a new "Rails Way" framework) |
Member
Author
|
It's been revealed! https://www.youtube.com/watch?v=HJZ9TnKrt7Q
There's another Rails 6 reveal in the wings still, but that's not a JS
related framework.
…On Thu, Nov 29, 2018 at 2:24 PM Shashi Prabhakar ***@***.***> wrote:
@dhh <https://github.com/dhh> keeping my eyes peeled for the promised new
JS framework for Rails 6.0 reveal! (Haven't found anything satisfying so
far with either React, or Stimulus or Ember - hope its a new "Rails Way"
framework)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33079 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAKtSfFeAoI1p87DRkq8ikb7a14INOPks5u0F6LgaJpZM4UegdM>
.
|
This was referenced Dec 1, 2018
5 tasks
bogdanvlviv
added a commit
to bogdanvlviv/rails
that referenced
this pull request
Jan 13, 2019
Fix path to channel files. `rails generate channel Chat` generates `app/javascript/channels/chat_channel.js`. See also, railties/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt, actioncable/lib/rails/generators/channel/templates/javascript/index.js.tt by default `application.js` imports "channels", where `app/javascript/channels/index.js` loads all the channels within this directory and all subdirectories. Follow up rails#34709 Related to rails#33079
This was referenced Mar 20, 2019
This was referenced Apr 4, 2019
suketa
added a commit
to suketa/rails_sandbox
that referenced
this pull request
Jun 15, 2019
Make Webpacker the default JavaScript compiler for Rails 6 rails/rails#33079
suketa
added a commit
to suketa/rails_sandbox
that referenced
this pull request
Jun 16, 2019
Make Webpacker the default JavaScript compiler for Rails 6 rails/rails#33079
bluz71
added a commit
to bluz71/platters
that referenced
this pull request
Jun 23, 2019
webpacker will be the default JavaScript compiler for Rails 6: - rails/rails#33079 Note, webpacker and the asset pipeline can run side-by-side. - webpacker and yarn are now used to manage: jquery, rails-ujs, turbolinks and local-time JavaScript libraries. - jQuery is exported globally from webpacker and is used in the asset pipeline and JS remote responses - the album tracks visibility JS sprinkle is now ES6 served by webpacker instead CoffeeScript via the asset pipeline. Upcoming work: - Move/convert all CoffeeScript sprinkles from the asset pipeline to ES6 via webpacker - Replace Gemified Bootstrap via the asset pipeline with yarn and webpacker managed Bootstrap (v3) - Move images and stylesheets from the asset pipeline to webpacker - Delete the asset pipeline
JoshAshby
added a commit
to transientBug/transientbug-rails
that referenced
this pull request
Jul 20, 2019
seems like webpacker is increasingly the way to go for new js/css asset work in rails with it being the default in rails 6, so lets start working on transitioning to better practices and get some rewrites of the old code in ( rails/rails#33079 )
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make Webpacker the default Javascript compiler for Rails 6 with the following changes: