Reputation: 809
I have what is probably a simple jsx question, so please forgive my stupidity.
I'm playing with React's jsx command-line compiler. I have a VERY simple JSX file that looks like this:
var helloWorld = React.createClass({
render: function() {
return <div>hello</div>
}
})
If I type the following in the command-line, it compiles (and shows me the result in the console): jsx test.jsx
I want to output this file to test.js
. But if I try the command jsx test.jsx test.js
nothing happens -- it only outputs the help information for the jsx
command.
Any ideas? I feel like it should be obvious.
Upvotes: 0
Views: 2120
Reputation: 809
Ok, silly mistake. This command solves it:
jsx test.jsx > test.js
. The >
puts the output into a file. Simple enough.
Upvotes: 4