create-react-rollup-app
v0.0.2
Published
_This is still a beta, if something doesn’t work, please [file an issue](https://github.com/facebook/create-react-app/issues/new)._
Downloads
7
Readme
React Rollup App
This is still a beta, if something doesn’t work, please file an issue.
Create React apps with no build configuration.
Why RollupJS
Rollup for me represents the next generation of build tools based on its performance (build time), an easier configuration (less complicated than webpack but more involved than Parcel), and optional but out-of-the-box features likes source maps, and not using a .babelrc.
So why not try it for new projects so you can check it by yourself.
Quick Overview
npx create-react-rollup-app my-app
cd my-app
npm start
Then open http://localhost:5000/ to see your app.
When you’re ready to deploy to production, create a minified bundle with npm run build
.
Get Started Immediately
You don’t need to install or configure tools like Webpack or Babel. They are preconfigured and hidden so that you can focus on the code.
Just create a project, and you’re good to go.
Creating an App
You’ll need to have Node >= 8 on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to easily switch Node versions between different projects.
To create a new app, you may choose one of the following methods:
npx
npx create-react-rollup-app my-app
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)
npm
npm init react-rollup-app my-app
npm init <initializer>
is available in npm 6+
Yarn
yarn create react-rollup-app my-app
yarn create
is available in Yarn 0.25+
It will create a directory called my-app
inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
my-app
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│ └── index.html
└── src
├── __test__/
├── App.css
├── App.jsx
├── index.css
├── index.js
└── logo.svg
No configuration or complicated folder structures, just the files you need to build your app. Once the installation is done, you can open your project folder:
cd my-app
Inside the newly created project, you can run some built-in commands:
npm start
or yarn start
Runs the app in development mode. Open http://localhost:5000 to view it in the browser.
The page will automatically reload if you make changes to the code.
npm test
or yarn test
Runs the test watcher in an interactive mode. By default, runs tests related to files changed since the last commit.
npm run build
or yarn build
Builds the app for production to the public/
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified
Your app is ready to be deployed.
What’s Included?
Your environment will have everything you need to build a modern single-page React app:
- React, JSX, and ES6 support.
- Language extras beyond ES6 like the object spread operator.
- Autoprefixed CSS.
- A live development server that warns about common mistakes.
- A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.
License
Create React Rollup App is open source software licensed as MIT.