petehunt / node-jsx

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

Support multiple invocations of install. #7

Closed simenbrekken closed 9 years ago

simenbrekken commented 10 years ago

This patch allows install to be invoked several times for multiple extensions.

Example:

var JSX = require('node-jsx')
JSX.install()
JSX.install({extension: '.coffee', additionalTransform: function ... )

If the multiple invocation style isn't to your liking I've also made a multiple-extensions branch that expands options to achieve the same.