ruby-coffee-script
ruby-coffee-script copied to clipboard
Please make a new release for coffee-script-source with CoffeeScript 2.0.1
The documentation says, “This library depends on the coffee-script-source gem which is updated any time a new version of CoffeeScript is released.”
Several new versions of CoffeeScript have been released, the latest of which is version 2.0.1
.
Pretty please.
I created this pull request to update the coffee-script-source gem to version 2. https://github.com/rails/ruby-coffee-script/pull/23
It just got merged. Since CoffeeScript 2 transpiles into ES6 (see http://coffeescript.org/#whats-new-in-coffeescript-2): Is another 6to5 step wanted?
Oh, yeah, we will need es5 code.
You have any recommendation here? Should this be up to the user wether to enable 6to5 transpiling or not? I saw that in the uglifier gem description https://github.com/babel/ruby-babel-transpiler is given as an example for 6to5 transpiling.
I saw the @gobijan’s PR got merged. Is there anything holding back the gem release?
Anyone knows what's the current "official" sentiment in regard to coffeescript in rails? Will it still be the default? Is ES6 now preferred?
I saw that basecamp released stimulusjs (https://github.com/stimulusjs/stimulus) and it's written in Typescript. Rails action cable on the other hand is written in Coffeescript (v1?).
I contributed a patch that enables the automatic build of the coffee-script-source gem supporting coffeescript2 (rails/ruby-coffee-script#23) and it got merged. But there is no new release of that gem as you can see in this issue: rails/ruby-coffee-script#22 .
I did not get any feedback yet and I don't know what the plans are in regard to Coffeescript 1 vs 2 vs ES6 vs Typescript.
What direction is the Rails core team heading here? @rafaelfranca @dhh
Webpacker is in contention to become the preferred/default JavaScript compiler for Rails 6. With that comes the freedom to use whatever transpiler steps available through Webpack and Babel. Which means that in many ways it doesn’t really matter where “things are going”, you can write your JS in whatever flavor you please, and it will all compile together harmoniously.
That being said, CoffeeScript’s previous advantage over vanilla JS has shrunk considerably after ES2015 was released. I don’t think as many developers are going to be drawn to CS now as were in the past because of this. But that’s a triumph of CS! It helped show the way forward for vanilla JS, so we should celebrate its achievement rather than mourn its decline.
On Jan 7, 2018, at 07:57, Bijan Rahnema [email protected] wrote:
Anyone knows what's the current "official" sentiment in regard to coffeescript in rails? Will it still be the default? Is ES6 now preferred?
I saw that basecamp released stimulusjs (https://github.com/stimulusjs/stimulus) and it's written in Typescript. Rails action cable on the other hand is written in Coffeescript (v1?).
I contributed a patch that enables the automatic build of the coffee-script-source gem supporting coffeescript2 (rails/ruby-coffee-script#23) and it got merged. But there is no new release of that gem as you can see in this issue: rails/ruby-coffee-script#22 .
I did not get any feedback yet and I don't know what the plans are in regard to Coffeescript 1 vs 2 vs ES6 vs Typescript.
What direction is the Rails core team heading here? @rafaelfranca @dhh
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi! Even if Webpack seems to be the future of assets management in Rails, it would be nice to have this PR merged to ease the transition from assets pipeline to Webpack.
my 2 cents. thank you!
@n-rodriguez I don't see any PR open related to this, feel free to open one upgrading the version of CS
@guilleiguaran actually it's already merged: https://github.com/rails/ruby-coffee-script/pull/23. It just needs a new release.
@n-rodriguez you can configure your Gemfile to pull this repo from GitHub, but I recommend using CoffeeScript2 with WebPacker.
@joeldrapper : that's what I do but i'd prefer to not do it :/
I recommend using CoffeeScript2 with WebPacker.
I'd love to, but unfortunately migrating from assets pipeline to Webpacker is not free.
In order to release a version compatible with CoffeeScript 2 we need to transpile the ES6 to ES5. Please open a PR with that step that I'll release a new version.
I think it can be closed now. Thank you!
I also just added this to my Gemfile and it works quite well:
gem 'coffee-rails', '~> 5.0.0'
gem 'coffee-script-source', github: 'joeldrapper/coffee-script-source
If you don't need to support IE11 (no transpiling) then this will work fine with Sprockets 4.
@rafaelfranca do you plan on adding ES6 to ES5 transpiling option to be able to use coffeescript 2?
I don't. This project is pretty much deprecated at this point.
@pravi All major browsers now support ES6. I use Coffeescript 2 without transpiling in my Rails app and it works just fine.
@rafaelfranca my interest here is limited to building rails actionview from source. Alternatively if https://github.com/rails/rails/issues/45407 is addressed, that will suffice my usecase. blade / execjs don't seem to work with coffeescript 2 output, though using coffee command line and passing javascript instead of coffeescript to blade seems to work. So my immediate need is addressed.