Skip to content

Latest commit

 

History

History
81 lines (52 loc) · 2.85 KB

CONTRIBUTING.md

File metadata and controls

81 lines (52 loc) · 2.85 KB

Contribution Guidelines

Since this project is still in development, the details of the contribution guidelines are subject to change.

To see Chinese version, see 贡献指南

Contributing

Setup BangumiToday Project

  1. Download and install Flutter.
  2. Clone the repository,or fork it.
  3. Create a new branch from main.
  4. Run flutter pub get to install dependencies.
  5. Run dart run husky install to install husky hooks to make lint_staged work properly.

Run BangumiToday Project

For security reasons, the project stores some sensitive information in the .env file, which will not be uploaded to the repository.

You need to create .env file in the root directory of the project, and fill the data below:

BANGUMI_APP_ID=xxx
BANGUMI_APP_SECRET=xxx

You can get the BANGUMI_APP_ID and BANGUMI_APP_SECRET from Bangumi API

by creating a new app.

After you have created the .env file, you could run the project by using the following command:

flutter run

Development

Prefer to use Android Studio with dart and flutter plugins.

When you make changes to the project,

you could create a pull request to the main branch of this repository.

If the changes involve data models, please submit the files generated by build_runner.

Code Style

The project uses lint_staged, flutter_lints, import_sorter and other tools to check the code style.

It is recommended to check the code style after changing the file:

  1. Check if there are any warnings in dart analyze, and resolve them if there are any.
  2. Run dart run import_sorter:main to sort the imports.
  3. lint_staged will automatically check the code style when submitting code. If it does not meet the requirements, the code will not be submitted.

Note that due to the serious problem of lint_staged used in the project, when too many files are submitted at once, multiple processes will be started, which will seriously occupy the CPU and memory, causing the computer to freeze.

For more information on the above,see issue

Therefore, if the number of files involved in the changes exceeds 10, please submit 10 files first, and then submit the remaining files by amend, and the number of files submitted at one time does not exceed 10.

The project does not have strict requirements for commit messages, but it is recommended to use Gitmoji to make the commit messages more readable.

You can use it in Android Studio by installing the plugin.

Start new issue

If you have any questions or suggestions,you could start a new issue by ISSUE_TEMPLATE.

Before you start a new issue, please check if the issue has already been reported.