Created
November 17, 2016 18:53
-
-
Save kenjij/19a5287e82792100a1b7ca502ccd9fce to your computer and use it in GitHub Desktop.
Compiling Reactjs/JSX using Babel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Usage: | |
| # - Install npm | |
| # - Configure package.json | |
| # - Place source code in "src/" | |
| # - Outputs to "app.js" | |
| npm run build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "myapp", | |
| "version": "0.0.0a", | |
| "description": "A Reactjs app using JSX.", | |
| "devDependencies": { | |
| "babel-cli": "", | |
| "babel-preset-es2015": "", | |
| "babel-preset-react": "" | |
| }, | |
| "scripts": { | |
| "build": "babel src --out-file app.js --no-comments --minified" | |
| }, | |
| "babel": { | |
| "presets": ["react", "es2015"] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment