0.2.0 • Published 9 years ago

jsx-require-extension v0.2.0

Weekly downloads
17
License
MIT
Repository
github
Last release
9 years ago

jsx-require-extension

Build Status NPM version

A simple node module to register a require.extensions loader for JSX files. For more information about JSX, visit Facebook's JSX Specification.

Usage

By simply requiring jsx-require-extension, you can immediately require JSX files.

require( 'jsx-require-extension' );
require( './my-react-component.jsx' );

This module is intended to be used directly in other modules without need for a setup process. For example, you can use it as a Mocha compiler through Mocha's --compilers flag:

$ mocha --compilers jsx:jsx-require-extension

Lastly, if you want to pass flags, you can instead require the corresponding file found in the options directory:

require( 'jsx-require-extension/options/harmony' );

Versioning

Use the following table to determine which version of jsx-require-extension works with your version of React.

Reactjsx-require-extension
0.1.x - 0.11.x0.1
0.12.x+0.2

License

Copyright (c) 2014 Automattic, Inc.

Released under the MIT License.