elixir-react-jsx
v3.0.0
Published
Laravel Elixir extension to transform React JSX
Downloads
15
Readme
Laravel Elixir - React JSX transforming
npm install elixir-react-jsx --save-dev
Then require elixir-react-jsx
in your gulpfile, and you can use mix.jsx()
.
Pretty simple.
var elixir = require('laravel-elixir');
require('elixir-react-jsx');
elixir(function(mix) {
mix.jsx();
});
By default, using mix.js()
without any arguments is the same as using:
mix.jsx('resources/assets/jsx/*.jsx', 'public/js');
Arguments:
- input src
- output dest
Transforming all your jsx files, and saving them to public/js
var src = 'resources/assets/jsx/*.jsx';
mix.jsx(src);
Transforming all your jsx files, and saving them to public/react
var src = 'resources/assets/jsx/*.jsx';
var dest = 'public/react';
mix.jsx(src, dest);
Concatenating all your jsx files to one js file
var src = 'resources/assets/jsx/*.jsx';
var dest = 'public/js/app-react.js';
mix.jsx(src, dest);