Socket
Socket
Sign inDemoInstall

babel-jsx

Package Overview
Dependencies
55
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-jsx

transparently require/transform jsx from node with babel


Version published
Weekly downloads
5
Maintainers
1
Install size
13.6 MB
Created
Weekly downloads
 

Readme

Source

babel-jsx

Transparently require() and transform jsx from node with babel.

Usage

require('babel-jsx').install()

If you want to use a different extension, do:

require('babel-jsx').install({extension: '.jsx!'})

If you want to couple with an additional transform (such as CoffeeScript), do:

var coffee = require('coffee-script');
require('babel-jsx').install({
  extension: '.coffee',
  additionalTransform: function(src) {
    return coffee.compile(src, {
      'bare': true
    });
  }
});

Credit

Based on node-jsx by Pete Hunt

FAQs

Last updated on 26 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc