This project has been build for the purpose of learning and practicing the following technologies:
- Typescript
- Next JS / React
- GraphQL
- GraphCMS
Will also setup some basic tools for CI/CD. Also planning to include cypress e2e tests.
Clone the repo and run the following commands at the root of the project: Copy the .env.example file to .env and replace the XXXXX values.
yarn install
yarn dev
yarn prepare // Installs the pre-commit hooks
This project uses Prettier and ESLint in Google Style config to perform static checks on all the code.
This project uses TypeScript to simplify JavaScript allowing to be read and to debug easier.
This project is using husky to prevent issues while we're trying to push/commit our code to remote.
- Code Style Standards
- Linting Standards
- Typescript Standards
- Successful build test
- Staged File Checks (-all of the above)
yarn dev
: Starts the project in development modeyarn build
: Builds the project for productionyarn start
: Starts the production serveryarn check-types
: Checks for typescript errorsyarn check-format
: Checks for code style errorsyarn check-lint
: Checks for linting errorsyarn format
: Runs format on all filesyarn lint
: Runs check-types, check-format and check-lintyarn test
: Runs test suitesyarn test:coverage
: Runs test suites with coverage report generationyarn test-all
: Runs all pre-push checks (format, types, lint, test, prod-build)yarn prepare
: Installs pre-commit husky hooks