mathew-kurian / node-configify

Browserify transform for node-config (aka. config) library
5 stars 4 forks source link

Usage with coffeescript #1

Open tume opened 9 years ago

tume commented 9 years ago

I was trying to use your library in react project coded with coffeescript and run into some issues:

I'm running coffee-reactify transform before this so everything is pure javascript.

First all my files have '.cjsx' extension so it just skipped all those...would be nice to add .cjsx to the list or somehow specify which extension to go through.

It also seems to skip require statements written in coffeescript because it is checking if (node.parent.parent.type === 'VariableDeclarator')

If my reasoning is correct this happens because coffeescript is declaring variables first and at that point it's just an assignment operation (AssignmentExpression)

mathew-kurian commented 9 years ago

That makes sense. Thanks for catching it! Unfortunately, I don't have the bandwidth to fix the issue. But, I will welcome a PR.