Skip to content

Conversation

@ezzatron
Copy link

@ezzatron ezzatron commented Jan 8, 2016

As of 1.2, CouchDB has native CoffeeScript support. This PR adds basic support for CoffeeScript to couchdb-compile.

@jo
Copy link
Owner

jo commented Jan 8, 2016

Thank you very much for this pull!

Two questions:

  • why is this Rudimentary CoffeeScript support and what is needed to make it full?
  • could you please have a look at the tests - why do they fail?

@ezzatron
Copy link
Author

Sorry, I guess I was only running the compile tests locally. All tests now pass.

I suppose "rudimentary" is not entirely accurate. I wasn't super happy with my code, and figured you'd probably want to clean it up a bit before pulling, especially with regards to useIndex(), where I essentially just copy-pasted the existing function body inside itself to look for CoffeeScript module indexes. I just needed something that would get us by for now at my work, as this PR does.

To make it more solid, I would probably expect to see support for arbitrary languages, not just JS and CS, given that you can use just about any language with CouchDB (as long as you have the language server to support it).

Perhaps something in the options could add additional filename extensions to check for when looking for module indexes. That way you could probably support TypeScript, IcedCoffeeScript, etc. etc.

In any case, since CS support is now native in CouchDB, I felt that should probably just work out of the box here.

@jo
Copy link
Owner

jo commented Feb 9, 2016

Hey @ezzatron I am so sorry, I totally forgot your pr and changed the code according to standard, which lead to thousand merge conflicts. Could I kindly ask you to rebase your branch?

@ezzatron
Copy link
Author

ezzatron commented Feb 9, 2016

@jo No worries, I can't tackle it right now, but I'll take a look a it soon.

@ezzatron
Copy link
Author

ezzatron commented Aug 1, 2016

Sorry it's been so long. I ended up writing my own similar library to tackle my use case better. If you're interested in the challenged I ran into while trying to use couchdb-compile, I wrote a little summary of the differences between the two libraries.

@ezzatron ezzatron closed this Aug 1, 2016
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.

2 participants