Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/carbonfive/spraygun-react-ts

TypeScript React application prototype for Spraygun, the Carbon Five JavaScript application generator.
https://github.com/carbonfive/spraygun-react-ts

spraygun

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# spraygun-react-ts

[![CircleCI](https://circleci.com/gh/carbonfive/spraygun-react-ts/tree/main.svg?style=shield)](https://circleci.com/gh/carbonfive/spraygun-react-ts/tree/main)

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 modules
- 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 16 and Yarn installed, and then generate your project like this:

```
$ npx spraygun -t react-ts
```

💡 If you'd like to use spraygun-react-ts with with Rails, start by generating a Rails project with [raygun](https://github.com/carbonfive/raygun), and follow the [instructions for enabling React with TypeScript](https://github.com/carbonfive/raygun#react-with-typescript) in Rails. From there, you can cherry-pick files and patterns from this template into your React frontend in `app/javascript/`.

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

---

# app-prototype

This is a React app written in TypeScript.

## Prerequisites

- Node 16 (see [.node-version](./.node-version))
- Yarn 1.12.1 or higher

It is strongly recommended that you use a version manager like [nvm](https://github.com/nvm-sh/nvm), [nodenv](https://github.com/nodenv/nodenv), or [asdf](https://asdf-vm.com/) to ensure the correct Node version. If you use asdf, make sure to add the nodejs plugin and [enable legacy version files](https://github.com/asdf-vm/asdf-nodejs#nvmrc-and-node-version-files).

## Quick start

Install dependencies:

```
yarn install
```

Start the server:

```
yarn start
```

This will launch the app at:

## 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-ts](https://github.com/carbonfive/spraygun-react-ts)_