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

Grunt LiveScript & CoffeeScript dependency strategy #911

Closed
vladikoff opened this issue Sep 18, 2013 · 17 comments
Closed

Grunt LiveScript & CoffeeScript dependency strategy #911

vladikoff opened this issue Sep 18, 2013 · 17 comments

Comments

@vladikoff
Copy link
Member

We need a way to make sure Gruntfile.coffee and Gruntfile.ls files keep up with the latest version of the "coffee-script" and "LiveScript" packages. However we also need to make sure that Gruntfile.{ls,coffee} works for everyone and doesn't cause issues on different environments.

Some points of discussion:

@tracker1
Copy link

Okay, there have been several "closes" regarding bumping to the latest coffeescript version... is there a particular and specific reason that this hasn't been done? The existing coffeescript reference means that Gruntfile.coffee doesn't work in windows.

So my question is, what breaks by updating the coffee version?

@cowboy
Copy link
Member

cowboy commented Sep 19, 2013

@tracker1 if you can PROVE that absolutely 0% of existing code out there will break if we upgrade the coffee-script lib, we'll be happy to update it. If, however, any existing code breaks, it's going to have to wait until 0.5.0.

See #782 (comment) for a more thorough explanation. The coffee-script functionality is, unfortunately, far more complex a problem to solve than the ones listed in that issue, but it should give you a better idea of the problem we're having.

Thanks.

@vladikoff
Copy link
Member Author

Hey @tracker1 , thanks for responding here!

What are some issues you are having with Windows? I've tested a few random projects with Gruntfile.coffee on Windows and it seemed to work fine.
Or are you just limited by functionality in coffee-script 1.3 ?

@tracker1
Copy link

@vladikoff For me, when I created @767, coffee-script 1.3.3 didn't even work in windows... if I tried to compile my Gruntfile.coffee via a command-line cs1.3 it had an empty output, unless I wrapped the entire script into an iife.

I've been using Gulp on my more recent projects so less of an issue for me these days.

@nschonni
Copy link

I'm using Gruntfile.coffee without any issue on Windows (Vista x86 & 8 x64)

@vladikoff
Copy link
Member Author

@nschonni maybe months ago when users tried to install CS 1.3 it didn't work and then they fixed it?

@nschonni
Copy link

@vladikoff it's possible, or maybe I'm just doing more vanilla Gruntfile that isn't using features in 1.6

I'm also not actually compiling the file at the command line as @tracker1 indicated.

@tracker1
Copy link

I only tried compiling the gruntfile at command line to see what the issue was... for me, I was getting an empty Gruntfile.js from cs version referenced from grunt, but not with the current version (at the time)...

I'm no longer working at the company I was having the issue, or would post the grunt file I was using at the time.

@vladikoff
Copy link
Member Author

One solution to this would be using the .gruntrc file, see #934 for more details

@hazeledmands
Copy link

FYI: right now, if you require grunt in any project that uses CoffeeScript, whatever version of CoffeeScript you were using is overwritten by version 1.3.3, which is the version that grunt has in its package.json. (See jashkenas/coffeescript#3208 for a potential solution on the CoffeeScript side.)

@metalshark
Copy link

Is there a target I can use in npm to to install the pre-release version of 0.5.0 to gain literate coffeescript support whilst we wait for the release to be finished?

@vladikoff
Copy link
Member Author

So far the planned support is for these:
*.ls - LiveScript
*.coffee, *.litcoffee, *.coffee.md - CoffeeScript
*.ts - TypeScript

If anyone has any other suggestions please comment below.

@tkellen
Copy link
Member

tkellen commented May 6, 2014

This is supported now in node-liftoff. We'll get it into grunt soon!

@dfernandez79
Copy link

@vladikoff I just saw comment in my PR referencing to this thread. (BTW Nice issue number!)

I don't see why this would break anything, even in the CoffeeScript changelog the only breaking change is to require register.

Why having to wait for the 0.5 Liftoff solution that requires a more involved rewrite? (the last message in the thread from May 2014!)

I understand that the Liftoff approach is better, since this really belongs to the grunt-cli rather than to the core. But I'm a little bit disapointed, because a one line fix adds value to your coffee users. So to me it makes sense to bump a small update rather leave the issue in the limbo for several months :(

For reference this is problematic when you have custom tasks in Coffee, or in projects that allows you to split your Gruntfile in several coffee files (like grunt-load-config). The old version of Coffee doesn't handle some identation cases very well.

@vladikoff
Copy link
Member Author

@dfernandez79 this is up to @cowboy and @tkellen, not me.

@cryptoquick
Copy link

I hereby voice my support for an upgrade. 👍

@shama
Copy link
Member

shama commented Jan 23, 2016

Closing as coffee-script is now updated on master.

Going forward, we'll move towards liftoff which will enable support for additional languages and keeping dependencies more up to date. Look for an https://github.com/gruntjs/rfcs related to it soon (or open one if you would like to take on this endeavor sooner). Thanks!

@shama shama closed this as completed Jan 23, 2016
@vladikoff vladikoff changed the title Grunt LiveScript & CoffeeScript dependency strategy Grunt LiveScript & CoffeeScript dependency strategy Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants