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

Fixes allowing source mapping to work #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixes allowing source mapping to work #62

wants to merge 1 commit into from

Conversation

dtilchin
Copy link

  • filename is a required option to compile()
  • Parens around a ternary, since ('name' + false ? '' : '.coffee') evaluates to '', not 'name.coffee'

Tested in Chrome 33 and Firefox 24. Without the first fix, the compile() fails because it tries to split() filename, which is undefined. See compile() in coffee-script.coffee in the CS source.

- filename is a required option to compile()
- Parens around a ternary, since ('name' + false ? '' : '.coffee') evaluates to '', not 'name.coffee'
@dtilchin dtilchin mentioned this pull request Mar 20, 2014
@guybedford
Copy link
Contributor

LGTM

@dtilchin
Copy link
Author

Hey, just checking in - it would be great to get this accepted to making distributing code that uses this easier.

@kumarharsh
Copy link
Member

I have a couple of questions:

Firstly, from the demo code we have in this project, I couldn't see any difference between the compiled files using the old cs.js and your patched cs.js.
Could you supply a small sample code which demonstrates what changes does your patch do to the compiled files?

Secondly, From #42

...it works pretty well - except for exceptions, where it always maps to one statement above the statement that caused the error, at the same indentation level.

I think we should document this short-coming (maybe an update to the readme?) for future reference or another patch.

@dtilchin
Copy link
Author

dtilchin commented Mar 4, 2018

This is super old, not even sure if it's an issue any more. It was a breaking issue, so I'm sure someone would have fixed it by now if so.

@dtilchin dtilchin closed this Mar 4, 2018
@kumarharsh
Copy link
Member

kumarharsh commented Mar 4, 2018

It's weird why I didn't merge the PR back then. The issue hasn't been fixed. Partly because this project and coffeescript to a lesser extent, is nearly dead for some time now. Really sorry. 😐

I could merge it now, if you would like @dtilchin.

Update - you'll just need to sign the CLA before I can merge it.

@kumarharsh kumarharsh reopened this Mar 4, 2018
@jsf-clabot
Copy link

jsf-clabot commented Mar 4, 2018

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@hayme1979
Copy link

de07c4b

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

Successfully merging this pull request may close these issues.

5 participants