satyr / coco

Unfancy CoffeeScript
http://satyr.github.com/coco/
MIT License
498 stars 48 forks source link

Modules as directories with index.co don't seem to work #216

Closed ksdlck closed 11 years ago

ksdlck commented 11 years ago
echo 'require \l' > t.co
mkdir l
echo 'exports.l = \l' > l/index.co
coco t.co
Failed at: t.co
Error: Cannot find module 'l'
vendethiel commented 11 years ago

I think coco doesn't register its extension so you need to compile it. I totally could be wrong.(and I do think so)

satyr commented 11 years ago

Try: require \./l

ksdlck commented 11 years ago

Works. Unfortunately this is what I had in the larger bit of code that is not working, and what was omitted in the testcase above. Better that the issue is not this in any case.

ksdlck commented 11 years ago

Very strange behavior here; the impetus for opening this issue was that manually compiling an index.js from the index.co in the directory-module in question solved the issue, though now removing it things still work as expected. I believe this may be an unrelated Makefile issue.