Skip to content
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

Please make a new release for coffee-script-source with CoffeeScript 2.0.1 #22

Open
joeldrapper opened this issue Sep 27, 2017 · 21 comments

Comments

@joeldrapper
Copy link

joeldrapper commented Sep 27, 2017

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.

@joeldrapper joeldrapper changed the title Please make a new release for coffee-script-source with version CoffeeScript 2.0.1 Please make a new release for coffee-script-source with CoffeeScript 2.0.1 Sep 27, 2017
@kWhittington
Copy link

Pretty please.

@gobijan
Copy link
Contributor

gobijan commented Oct 22, 2017

I created this pull request to update the coffee-script-source gem to version 2.
#23

@gobijan
Copy link
Contributor

gobijan commented Oct 24, 2017

It just got merged. Since CoffeeScript 2 transpiles into ES6 (see http://coffeescript.org/#whats-new-in-coffeescript-2): Is another 6to5 step wanted?

@rafaelfranca
Copy link
Member

Oh, yeah, we will need es5 code.

@gobijan
Copy link
Contributor

gobijan commented Oct 25, 2017

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.

@joeldrapper
Copy link
Author

I saw the @gobijan’s PR got merged. Is there anything holding back the gem release?

@gobijan
Copy link
Contributor

gobijan commented Jan 7, 2018

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 (#23) and it got merged. But there is no new release of that gem as you can see in this issue: #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

@dhh
Copy link
Member

dhh commented Jan 7, 2018 via email

@n-rodriguez
Copy link

n-rodriguez commented Feb 22, 2018

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!

@guilleiguaran
Copy link
Member

@n-rodriguez I don't see any PR open related to this, feel free to open one upgrading the version of CS

@n-rodriguez
Copy link

@guilleiguaran actually it's already merged: #23.
It just needs a new release.

@joeldrapper
Copy link
Author

@n-rodriguez you can configure your Gemfile to pull this repo from GitHub, but I recommend using CoffeeScript2 with WebPacker.

@n-rodriguez
Copy link

@joeldrapper : that's what I do but i'd prefer to not do it :/

@n-rodriguez
Copy link

I recommend using CoffeeScript2 with WebPacker.

I'd love to, but unfortunately migrating from assets pipeline to Webpacker is not free.

@rafaelfranca
Copy link
Member

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.

@n-rodriguez
Copy link

I think it can be closed now. Thank you!

@pomartel
Copy link

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.

@pravi
Copy link

pravi commented Jun 20, 2022

@rafaelfranca do you plan on adding ES6 to ES5 transpiling option to be able to use coffeescript 2?

@rafaelfranca
Copy link
Member

I don't. This project is pretty much deprecated at this point.

@pomartel
Copy link

@pravi All major browsers now support ES6. I use Coffeescript 2 without transpiling in my Rails app and it works just fine.

@pravi
Copy link

pravi commented Jun 23, 2022

@rafaelfranca my interest here is limited to building rails actionview from source. Alternatively if rails/rails#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants