Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
/ spraygun-react Public archive

React application prototype for Spraygun, the Carbon Five JavaScript application generator.

License

Notifications You must be signed in to change notification settings

carbonfive/spraygun-react

Repository files navigation

⚠️ This repo has been archived and is not being maintained. ⚠️

Please use the TypeScript version instead: spraygun-react-ts.


spraygun-react

CircleCI

This is a Carbon Five-flavored convenience skeleton project for React. It is based on create-react-app (not ejected) with the following additions:

  • Styling via .scss with BEM conventions
  • Stylelint
  • ESLint/Prettier
  • Husky with lint-staged
  • CI testing via Circle CI
  • Deployable to Heroku out of the box
  • Or deploy via docker using the included Dockerfile

To get started, make sure you have Node 10+ and Yarn installed, and then generate your project like this:

$ npx spraygun -t react <project-directory>

If you'd like to use spraygun-react with a Rails API backend, follow this guide:

Using spraygun-react with a Rails backend

If you'd like to use spraygun-react with Redux, here are potential file structures:

Redux file structures

Below this line is the README that will accompany your generated project.


app-prototype

This is a React 16 app.

Prerequisites

  • Node 14.16.0
  • Yarn 1.12.1 or higher

Quick start

Install dependencies:

yarn install

Start the server:

yarn start

This will launch the app at:

http://localhost:3000/

Task reference

  • yarn start starts the development server listing on port 3000. Changes to .js or .scss files automatically refresh in the browser.
  • yarn test runs tests in "watch" mode, automatically focusing on tests or code that were modified since the last commit. Press the a key after the test runner has started to watch all tests in the project.
  • yarn test:coverage runs all tests, prints coverage stats, and then exits.
  • yarn lint runs all ESLint checks and then exits.
  • yarn build generates an optimized bundle of the app into the build directory, suitable for deployment.

Generated by spraygun-react

About

React application prototype for Spraygun, the Carbon Five JavaScript application generator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published