Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexkrolick/create-react-babel
Initialize an NPM project with Babel set up to build React files *work in progress*
https://github.com/alexkrolick/create-react-babel
babel npm-init preset react
Last synced: about 1 month ago
JSON representation
Initialize an NPM project with Babel set up to build React files *work in progress*
- Host: GitHub
- URL: https://github.com/alexkrolick/create-react-babel
- Owner: alexkrolick
- License: other
- Created: 2018-06-26T03:07:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T07:31:03.000Z (over 6 years ago)
- Last Synced: 2024-12-09T09:58:38.165Z (about 1 month ago)
- Topics: babel, npm-init, preset, react
- Language: JavaScript
- Homepage:
- Size: 306 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# create-react-babel
> _A fork of [npm/init-package-json](https://github.com/npm/init-package-json)_
Initialize an NPM project with Babel set up to build React files
1. 💻 **CLI Command**
```sh
npm init react-babel # npm 6 and up
npx create-react-babel # npm 5 and up
npm install --global create-react-babel # npm 4
```2. ↳ **Follow prompts**
3. 🎬 **`package.json` is created**
```
Is this OK? (yes)
{
"name": "test-babel-react",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"build": "babel $npm_package_buildSrcDir -d $npm_package_buildOutDir --presets=react-app/prod",
"dev": "babel $npm_package_buildSrcDir -d $npm_package_buildOutDir --watch --presets=react-app/dev"
},
"author": "",
"buildSrcDir": "src",
"buildOutDir": "lib",
"devDependencies": {
"babel-cli": "^6",
"babel-preset-react-app": "^3"
},
"dependencies": {},
"description": ""
}Your React build system is ready to go!
Now run:
⚡️ Install dependencies:
npm install🚦 Production build:
npm run build🚧 Development build (watcher):
npm run dev
```---
## Options
```
--help, -h print help
--yes, -y don't prompt for anything, use defaults
--all, -a show prompts for non-React/Babel things like "entry point"
```