petehunt / node-jsx

transparently require() jsx from within node
164 stars 32 forks source link

Pass filename to transform function #41

Closed boblauer closed 7 years ago

boblauer commented 9 years ago

It can be useful to pass the filename to the transform method, to know which file you're transforming (at least in my case it is). I'm doing a somewhat strange transform, so maybe my use-case is very unique, but it seems like passing the filename to the transform wouldn't hurt anything.