@samitouri / QOS-React-2 / commits / db7ea058e7

[docs] Update Getting Started for babel 6

Paul O’Shannessy committed Nov 2, 2015 at 12:56 UTC db7ea058e773247c0651b6df70c43bd45cb4879e
1 file changed +14 -5
docs/docs/getting-started.md
+14 -5
@@ -30,10 +30,15 @@ ReactDOM.render(
30 To install React DOM and build your bundle after installing browserify:
31
32 ```sh
33 -$ npm install --save react react-dom
34 -$ browserify -t babelify main.js -o bundle.js
33 +$ npm install --save react react-dom babelify babel-preset-react
34 +$ browserify -t [ babelify --presets [ react ] ] main.js -o bundle.js
35 ```
36
37 +> Note:
38 +>
39 +> If you are using ES2015, you will want to also use the `babel-preset-es2015` package.
40 +
41 +
42 ## Quick Start Without npm
43
44 If you're not ready to use npm yet, you can download the starter kit which includes prebuilt copies of React and React DOM.
@@ -94,16 +99,20 @@ Note that some browsers (Chrome, e.g.) will fail to load the file unless it's se
99 First install the [Babel](http://babeljs.io/) command-line tools (requires [npm](https://www.npmjs.com/)):
100
101 ```
97 -npm install --global babel
102 +npm install --global babel-cli
103 +npm install babel-preset-react
104 ```
105
106 Then, translate your `src/helloworld.js` file to plain JavaScript:
107
108 ```
103 -babel src --watch --out-dir build
104 -
109 +babel --presets react src --watch --out-dir build
110 ```
111
112 +> Note:
113 +>
114 +> If you are using ES2015, you will want to also use the `babel-preset-es2015` package.
115 +
116 The file `build/helloworld.js` is autogenerated whenever you make a change. Read the [Babel CLI documentation](http://babeljs.io/docs/usage/cli/) for more advanced usage.
117
118 ```javascript{2}