1.0.2 • Published 5 years ago

create-react-sensible-defaults v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Create React Sensible Defaults

Purpose

Every time a new React app was needed, we would create-react-app and then would perform the same changes on the new project: add a formatter, add a linter, add some configuration files for both (to easier share them within the team), add some git hooks to run tests before pushing, etc...

This project was created to automatically perform all that manual work 😉.

How to use it

From bash

npx create-react-sensible-defaults myAwesomeApp

How it works

It starts by running create-react-app with a given app name, and then performs the following changes on the newly created projec:

  • Adds linter (ESLint) and formatter (Prettier) resource files.
  • Adds pre-push hook to run the unit tests before every git push command.
  • Adds a globalStyles.js file to store reusable style constants like e.g. color codes, font details etc.
  • Folder structure: Store component code & style & test in a folder with the same name as the component.
  • Code conventions: the default JavaScript code conventions (e.g. naming) were used.