This repo serves as a template for starting new web app projects, using React and TypeScript. It provides sane defaults & tools for linting, tests, and building.
Included tools & technologies are:
Page components go into src/pages/*
and UI components into
src/components/*
. Both pages and components follow the same structure,
consisting of the following files:
const.ts
- exports the componentCLASS_NAME
and any other constantsprops.ts
- providesdefaultProps
andpropTypes
types.ts
- defines an interface for the component propTypesstyle.scss
- component stylesheet, imported inindex.tsx
index.tsx
- the component itself
yarn start
: starts the dev server and opens the index page in a browseryarn build
: builds the application to thedist
folder for Releaseyarn format
: runs Prettieryarn lint
: runs ESLintyarn test
: runs Jestyarn test:coverage
: runs Jest and outputs coverage resultsyarn test:watch
: runs Jest and runs tests on changesyarn test:snapshots
: runs Jest and updates snapshotsyarn update-version
: updates CHANGELOG.md, bumps & tags the versionyarn prepare
: installs Husky hooksyarn prepare-release
: lints, tests, and buildsyarn release
: runsprepare-release
andupdate-version
See CHANGELOG.md for more information.
Distributed under the MIT license. See LICENSE.md for more information.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request