Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuliren/battery
Interactive toys for Charles
https://github.com/tuliren/battery
Last synced: 7 days ago
JSON representation
Interactive toys for Charles
- Host: GitHub
- URL: https://github.com/tuliren/battery
- Owner: tuliren
- License: mit
- Created: 2024-02-06T21:21:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-01T07:44:49.000Z (about 1 month ago)
- Last Synced: 2025-01-01T08:24:32.427Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://battery.liren.dev
- Size: 992 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Battery
[![Build](https://github.com/tuliren/battery/actions/workflows/build.yaml/badge.svg)](https://github.com/tuliren/battery/actions/workflows/build.yaml)
## Development
### Dev credential
- Add dev credential from `.env.sample`
```
cp .env.sample .env.local
```
- Update `.env.local` with credentials from the dev database### Dev server
- Run
```
corepack enable
yarn install
yarn dev
```
- Visit `localhost:3000`### Local script
- Add a `ts` file under [`scripts`](./scripts).
- Run it with `yarn script scripts/ [parameters]`.### Environment Variables
| Env | `NEXT_PUBLIC_VERCEL_ENV` | `NODE_ENV` |
|---------|--------------------------|---------------|
| Local | `undefined` | `development` |
| Preview | `preview` | `production` |
| Prod | `production` | `production` |### IDE Support
- Setup `eslint` in IntelliJ
- Go to `Preferences / Language & Frameworks / JavaScript / Code Quality Tools / ESLint`
- Check `Manual ESLint configuration`
- Set `ESLint package` to `Detect package and configuration file from the nearest package.json`
- If you use `Automatic ESLint configuration`, the setting depends on the global format in
your IntelliJ, which may be different from the setting in this project.
- [Optional] Check `Run eslint --fix on save`
- Setup `prettier` in IntelliJ
- Go to `Preferences / Languages & Frameworks / JavaScript / Prettier`
- Select the `Prettier package` from the `node_modules`.
- [Optional] Check `On 'Reformat Code' action`
- [Optional] Check `On save`