create-react-babel

0.0.9 • Public • Published

create-react-babel

A fork of npm/init-package-json

Initialize an NPM project with Babel set up to build React files

  1. 💻 CLI Command
npm init react-babel # npm 6 and up 
npx create-react-babel # npm 5 and up 
npm install --global create-react-babel # npm 4 
  1. Follow prompts

  2. 🎬 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

Package Sidebar

Install

npm i create-react-babel

Weekly Downloads

2

Version

0.0.9

License

ISC

Unpacked Size

16.7 kB

Total Files

8

Last publish

Collaborators

  • alexkrolick