44 lines
1.5 KiB
Markdown
44 lines
1.5 KiB
Markdown
![Renai](resources/logo.png 'Renai')
|
|
|
|
# レンアイ - Hentai Library Thingy
|
|
|
|
## Development
|
|
|
|
### Quickstart
|
|
|
|
- `npm install`, the postinstall runs
|
|
- `npm run rebuild`
|
|
- might need to install some build tools depending on your platform
|
|
- `npm run typeorm:migrate` for installing the database
|
|
- `npm run tsc` for backend
|
|
- `npm run webpack` for frontend
|
|
- `npm run dev`
|
|
|
|
### Git Commits
|
|
|
|
This project uses [Conventional Commits](https://www.conventionalcommits.or) with the following types:
|
|
|
|
- `feat`: features, if any part of your commit implements a new functionality, use this
|
|
- `fix`: bugfixes
|
|
- `refactor`: code refactoring
|
|
- `update`: updating dependencies and associated code changes
|
|
- `doc`: documentation
|
|
- `config`: changing configuration (linters, build process)
|
|
- `reformat`: fixing code formatting
|
|
|
|
Always try to split up your changes into coherent commits, a single commit should do a single thing. If your commit needs to do more than one thing it should be labeled with the type coming first in this list.
|
|
|
|
### Database Migrations
|
|
|
|
Migrations are stored in [src/main/migrations](src/main/migrations) and handled by typeorm.
|
|
|
|
To auto-generate a migration:
|
|
`node_modules/.bin/typeorm migration:generate -n <migration name> -c <connection name>`
|
|
|
|
To create an empty creation which can be filled with custom migration code:
|
|
`node_modules/.bin/typeorm migration:create -n <migration name> -c <connection name>`
|
|
|
|
To run migrations:
|
|
`node_modules/.bin/typeorm migration:run -c <connection name>`
|
|
This is also pre-defined in the npm script `typeorm:migrate`.
|