mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Merge pull request #5865 from leeyoungalias/master
update react example basic-jsx-precompile comand line
This commit is contained in:
commit
ae5ff24da6
1 file changed
+4
-3
@@ -11,9 +11,10 @@
|
||||
<p>
|
||||
If you can see this, React is not running. Try running:
|
||||
</p>
|
||||
<pre>npm install -g babel
|
||||
<pre>npm install -g babel-cli
|
||||
cd examples/basic-jsx-precompile/
|
||||
babel example.js --out-dir=build</pre>
|
||||
npm install babel-preset-react
|
||||
babel example.js --presets react --out-dir=build</pre>
|
||||
</div>
|
||||
<h4>Example Details</h4>
|
||||
<p>This is written with JSX in a separate file and precompiled to vanilla JS by running:</p>
|
||||
@@ -25,8 +26,8 @@ babel example.js --out-dir=build</pre>
|
||||
|
||||
<p><i>With Babel 6.0 or higher</i></p>
|
||||
<pre>npm install -g babel-cli
|
||||
npm install babel-preset-react
|
||||
cd examples/basic-jsx-precompile/
|
||||
npm install babel-preset-react
|
||||
babel example.js --presets react --out-dir=build</pre>
|
||||
<p>
|
||||
Learn more about React at
|
||||
|
||||
Reference in new issue
Block a user