@samitouri / QOS-React-2 / commits / 1220ccc805

update instructions of the following examples: basic-commonjs, basic-jsx-external and basic-jsx-precompile

Mattijs committed Nov 11, 2015 at 10:51 UTC 1220ccc80585c7db885efda7a1042fdb1ed9b387
3 files changed +26 -5
examples/basic-commonjs/index.html
+10 -2
@@ -18,8 +18,16 @@
18 </p>
19 </div>
20 <h4>Example Details</h4>
21 - <p>This is written with JSX in a CommonJS module and precompiled to vanilla JS by running:</p>
22 - <pre>npm start</pre>
21 + <p>This is written with JSX in a CommonJS module and precompiled to vanilla JS by navigating to the example
22 + directory
23 + <pre>cd /path/to/react/examples/example-name</pre>
24 + and running
25 + <pre>npm start</pre>
26 + <br>
27 + (don't forget to install first)
28 + <pre>npm install</pre>
29 + <br>
30 + </p>
31 <p>
32 Learn more about React at
33 <a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.
examples/basic-jsx-external/index.html
+8 -3
@@ -10,12 +10,17 @@
10 <h1>Basic Example with External JSX</h1>
11 <div id="container">
12 <p>
13 - If you can see this, React is not working right. This is probably because you&apos;re viewing
14 - this on your file system instead of a web server. Try running
13 + If you can see this, React is not working right. This is probably because you&apos;re viewing
14 + this on your file system instead of a web server.<br>
15 + Try navigating to the React root
16 + <pre>
17 + cd /path/to/react
18 + </pre>
19 + and running
20 <pre>
21 python -m SimpleHTTPServer
22 </pre>
18 - and going to <a href="http://localhost:8000/">http://localhost:8000/</a>.
23 + and going to <a href="http://localhost:8000/examples/basic-jsx-external/">http://localhost:8000/examples/basic-jsx-external/</a>.
24 </p>
25 </div>
26 <h4>Example Details</h4>
examples/basic-jsx-precompile/index.html
+8
@@ -17,9 +17,17 @@ babel example.js --out-dir=build</pre>
17 </div>
18 <h4>Example Details</h4>
19 <p>This is written with JSX in a separate file and precompiled to vanilla JS by running:</p>
20 +
21 + <p><i>With Babel lower than 6.0</i></p>
22 <pre>npm install -g babel
23 cd examples/basic-jsx-precompile/
24 babel example.js --out-dir=build</pre>
25 +
26 + <p><i>With Babel 6.0 or higher</i></p>
27 + <pre>npm install -g babel-cli
28 +npm install babel-preset-react
29 +cd examples/basic-jsx-precompile/
30 +babel example.js --presets react --out-dir=build</pre>
31 <p>
32 Learn more about React at
33 <a href="https://facebook.github.io/react" target="_blank">facebook.github.io/react</a>.