cheshire-cat-v2
v0.2.9
Published
This is a [Next.js](https://nextjs.org/) app for cheshire cat v2.
Downloads
56
Keywords
Readme
This is a Next.js app for cheshire cat v2.
Getting Started
Install dependencies:
yarn install
Decrypt the environment files if you haven't done so.
Prerequisite: You must have Docker installed.
- Go to codeship -> projects -> cheshire-cat-v2.
- Click on the project.
- Click on the Project Settings button in the top right of the screen.
- Navigate to the General tab, and there you can download the AES key.
- Rename that file to codeship.aes and add it to the root directory of the cheshire-cat-v2 repo. Then run the following commands to decrypt the environment files:
# If you do not have the Jet CLI installed, run the following to install via Homebrew:
brew install --cask codeship/taps/jet
# To decrypt the development env file, run:
jet decrypt .env-cmdrc.enc .env-cmdrc
Run the development server:
npm run dev
# or
yarn dev
Open http://localhost:1865 with your browser to see the result.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Linting
Add eslint extension to VS code (or whatever editor you are using).
Before pushing up a PR - ensure that you run the lint command and address any issues:
yarn lint
alternatively - you can setup auto-linting in VS code:
- Create a .vscode folder at the root level
- add a file for settings.json
- add the following to this file to enable auto-linting on save:
{
"javascript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
- Note - .vscode is part of the .gitignore file because not everyone uses VScode AND any other personalized vscode settings would show up here. Feel free to choose your own experience, so long as we ensure linting is in line before we push up PRs.
Production Build
To simulate a production build:
yarn build
Testing
To run tests:
yarn test
Localization
Localization is done by next-i18next
. You can read the docs here. Hardcoded strings should never be place inside the markup but rather in the appropriate files within /public/locales/
directories.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository