dzervoudakes / react-scaffolder

Scaffolding for new enterprise scale React applications on the fly.
MIT License
7 stars 2 forks source link
boilerplate javascript react react-template typescript yeoman

React Scaffolder

Yeoman generator for scaffolding new React applications.

npm generator typescript javascript codecov quality prettier license

A Homegrown React Template Generator

While tools like Create React App and Next.js are objectively awesome, over time I've decided that I want to learn more about the engine behind the application. As such, I started building and evolving my own React + Webpack configuration over time as a learning experience.

I have since decided to share this tool with the open source community. Love it or loathe it, I will not be happy or offended either way. 🤷‍♂️

Prerequisites

Using the Generator

This scaffolding tool is a yeoman generator, and requires that yo be installed. After installing yo, run the following commands.

Install the Generator

NPM

npm install -g generator-react-scaffolder

Yarn

yarn global add generator-react-scaffolder

Scaffold a New React Template

To begin the scaffolding process:

yo react-scaffolder

At this stage, you will be prompted to provide the following:

With Options

Generate with TypeScript:

yo react-scaffolder --typescript

// alternatively
yo react-scaffolder --ts

The generator will attempt to install dependencies for you by default, though this operation can be disabled:

yo react-scaffolder --skip-install

What's Included

Rendering: client-side only\ ✅ Syntax: react, js, jsx, ts, tsx\ ✅ Tooling: eslint, stylelint, editorconfig, babel (non-TypeScript template only)\ ✅ Styling: scss, css, postcss, css module syntax (*.module.scss and *.module.css nomenclature supported)\ ✅ Testing: jest, react testing library\ ✅ Build instructions: provided via the README.md file generated with each new scaffold

What's Not Included

Script ejection: There are links to the default webpack config on github in each webpack.*.js file.\ ❌ Environment variables: The boilerplate is agnostic to your preferred implementation for consuming environment variables.

Disclaimers