Repository navigation
Coffee fix - #55
Coffee fix#55bitmage wants to merge 2 commits into
Conversation
Signed-off-by: bitmage <brandonjmason@gmail.com>
Signed-off-by: bitmage <brandonjmason@gmail.com>
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
@slnode ok to test |
|
@bitmage thank you for submitting a pull request, kudos for starting with a failing test! I see two problems in your implementation:
Here is what I would like you to do:
|
require('coffee-script/register');Which adds the .coffee extension to require.extensions. See implementation here: https://github.com/jashkenas/coffeescript/blob/master/lib/coffee-script/register.js#L19..L23 People using coffee-script should be familiar with this. I typically add it to my Gruntfile, index.js or whatever other entry point I have, so I don't have to worry about it in the rest of the app. I can document this if you would like. What would be a good place in the documentation? Maybe a side section about coffee-script/other compiled languages? .3. Yes, I can do that. I am using browserify/coffeeify already in my build process and it's working fine. I wasn't sure how you guys would feel about having coffee-script stuff in your dev dependencies, but it's no problem to implement. :-) Thanks for the detailed feedback. I'll try to have these changes incorporated by the end of the week. |
|
Also, I've signed the CLA (and signed each commit as requested), but it is still showing me an error saying I haven't. Not sure what to do about that. |
It should be enough to sign the CLA via the web interface. I don't know why it did not update the status of your commits. My hope is that when you push new commits, the CLA tool will re-run the check and make it all green. |
A side section is perfect. We are keeping most of our docs in Confluence, which is unfortunately not publicly editable. Can you write the docs as a gist and add a link here?
Adding coffee-stuff to dev dependencies is fine. It is a much better alternative compared to not having test coverage for coffee-based apps.
Excellent. Please leave a comment when the patch is ready for another review. GH does not send notifications on new commits, a comment is needed. |
|
Sounds good. Is this the markup format you are using? https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup I think the CLA problem is because the email I used in my git config is different than the one linked to my github account. Is there any way to sign with an email other than my github account? Otherwise, I may have to recommit on another branch and abandon this one. |
Probably yes. It will be better if you use Markdown, we can reformat as we move the content to Confluence. On the second thought, it will be best if you can add a file
@rmg can you help here please? @bitmage has signed our CLA, but CLA-hub is still complaining about his PR. |
|
I redid the pull request here: I think the CLA issues are resolved. Please review my additional changes as well. Thanks! |
|
The CLA hub is tied to github credentials so you would need to add your git config user.email address to your github account as an alternate email address. |
coffee-script files (or any other custom extensions for 'require') will not be loaded if there is a JSON file in the same location. This is because of the load order:
http://nodejs.org/api/modules.html#modules_all_together
Custom extensions get tried only after the builtin ones have been exhausted.
My fix is to take the list of files which had already been obtained, and filter it to exclude .json files, and any files that don't match the basename. I then take the first matching file and try a require.resolve on it.