Since Parcel JS arrived, I've been using it a lot as an awesome alternative for WebPack. Webpack isn't bad but IMO it's too complex for the job and parcel do the same (at least the basic) with almost zero configuration. But if you need to create many apps (like a react app) over and over again, it get's a lil boring following the basic steps.

npm init -y
npm install --save react
npm install --save react-dom
npm install --save-dev parcel-bundler
npm install --save-dev babel-preset-env
npm install --save-dev babel-preset-react

#create .babelrc file
#create html, css, jsx files

parcel index.html

It's not a hard job, a simple shell script do the job, but what if you need some IFs when creating the app, or even change a few things at the package.json? A shell script still does the job, but come on... There is a better way. Yeoman is here for you. I've already talked about it on another post (Portuguese post).

Straight to the point, I've released a Yeoman generator to get the things a lil quicker. The name is generator-parcel-react and it still lacks a few things that I will deal with soon. It's pretty simple to use it.

#First time only
npm install -g yo
npm install -g generator-parcel-react

#every time you create a new app
yo parcel-react

And that's it. Right now you can scaffold and app with React, SASS and React Router. Hope you like it and feel free to ask new features.


Translations: