From aedfa3011e0c9cbe63438897f3179d6d4e8c1be2 Mon Sep 17 00:00:00 2001 From: leeyoungalias Date: Sat, 16 Jan 2016 22:53:24 +0800 Subject: [PATCH] update react example basic-jsx-precompile comand line on markdown file,new version of babel needed a react presets dependency. --- examples/basic-jsx-precompile/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/basic-jsx-precompile/index.html b/examples/basic-jsx-precompile/index.html index f74a7379a6..53a84f8764 100644 --- a/examples/basic-jsx-precompile/index.html +++ b/examples/basic-jsx-precompile/index.html @@ -11,9 +11,10 @@

If you can see this, React is not running. Try running:

-
npm install -g babel
+      
npm install -g babel-cli
 cd examples/basic-jsx-precompile/
-babel example.js --out-dir=build
+npm install babel-preset-react +babel example.js --presets react --out-dir=build

Example Details

This is written with JSX in a separate file and precompiled to vanilla JS by running:

@@ -25,8 +26,8 @@ babel example.js --out-dir=build

With Babel 6.0 or higher

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

Learn more about React at