petehunt / node-jsx

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

Added possibility to add specific paths to be evaluated #43

Open christianalfoni opened 9 years ago

christianalfoni commented 9 years ago

node-jsx works great! The only problem is when you have a big dependency tree where just a fraction of the files actually contain JSX.

By defining paths...

var path = require('path');
require('node-jsx').install({
  paths: [path.resolve(__dirname, 'app')]
});

...only files in those directories and subdirectories will be transformed. This saves a lot of time when running tests or rendering isomorphic react.