Yeoman generator for React and Webpack

Lately I’ve found myself creating a lot of new React projects, whether it be because I wanted to try some of the hot latest Node.js modules or just because I needed to start working on a fresh idea. I decided then that I needed a Yeoman generator that could setup for me the basic bare-bones of a new project using React and Webpack.

Looking around, I found several generators that did what I wanted, but they weren’t being maintained and they created way more files than I needed for my projects. I was looking for something simpler, so that’s how the pauls-easy-react-webpack generator was born. I know, the name it’s really lame, and I could use npm deprecate to create a package with a better one, but – at least for the moment – pauls-easy-react-webpack will have to do.

Here’s a list of the generator’s current features:

  • React 16 and Material-UI as the main tools for development.
  • Babel for ES6 and React.
  • Webpack with webpack-dev-server, css-loader and style-loader for dev and extract-text-webpack-plugin for production.
  • ESLint with a lot of settings for React and ES6 “best practices”.
  • Directory structure pretty similar to the one described in this Medium article.
  • Basic component generation.

And some of the planned features:

  • New generators to create components and similar scaffolding elements.
  • Support for Redux (maybe…).
  • Optional Webpack config for Sass and Less.

If it sound like these features could help you with your new project, give it a try!

npm install -g generator-pauls-easy-react-webpack
mkdir myAwesomeProject
cd myAwesomeProject
yo pauls-easy-react-webpack

I know there are a lot of options out there, but I really hope this will be useful to more people than just me. If you want to read more about the generator, collaborate with new features or report issues, head to the Github repo: https://github.com/paulmdorr/generator-pauls-easy-react-webpack.

Responses

Write a response...