|
2 | 2 |
|
3 | 3 | This is a guide for contributors. |
4 | 4 |
|
5 | | -## How to dev |
| 5 | +## Design |
| 6 | + |
| 7 | +Please read the slides about css-modules-kit (in Japanese). |
| 8 | + |
| 9 | +- https://speakerdeck.com/mizdra/css-modules-kit |
| 10 | + |
| 11 | +## Repo Setup |
| 12 | + |
| 13 | +```console |
| 14 | +npm install |
| 15 | +npm run test |
| 16 | +``` |
| 17 | + |
| 18 | +## npm-scripts |
6 | 19 |
|
7 | 20 | - `npm run build`: Build for production |
8 | | -- `npm run dev`: Run for development |
9 | 21 | - `npm run lint`: Run static-checking |
10 | 22 | - `npm run test`: Run tests |
11 | 23 |
|
| 24 | +## How to debug |
| 25 | + |
| 26 | +You can run code in debug mode from the "Run and Debug" panel in VS Code. To start debugging, select one of the following configurations. |
| 27 | + |
| 28 | +- `codegen (...)`: Debug for `codegen` package |
| 29 | +- `eslint-plugin (...)`: Debug for `eslint-plugin` package |
| 30 | +- `stylelint (...)`: Debug for `stylelint` package |
| 31 | +- `vscode (...)`: Debug for `vscode` and `ts-plugin` package |
| 32 | +- `vscode-test`: Debug for `npm run test:vscode` |
| 33 | + |
| 34 | +Good to know: |
| 35 | + |
| 36 | +- You can set breakpoints in `*.ts` files. |
| 37 | +- In VS Code, you can view the tsserver log with `F1 > TypeScript: Open TS Server log`. |
| 38 | + - Runtime errors from `ts-plugin` are output there. |
| 39 | +- In VS Code, you can view the Extension Host log with `F1 > Output: Show Output Channels... > Extension Host`. |
| 40 | + - If the extension fails to load, the log will be output there. |
| 41 | + |
| 42 | +## Pull Request Guidelines |
| 43 | + |
| 44 | +1. Write your code |
| 45 | +1. Add tests if necessary |
| 46 | +1. Update documentation if necessary |
| 47 | +1. Pass `npm run lint` and `npm run test` |
| 48 | +1. Run `npx @changesets/cli add` to create a changeset if the change affects users |
| 49 | + - The summary should be in the following format: |
| 50 | + - For bug fixes: `fix: ...` |
| 51 | + - For new features: `feat: ...` |
| 52 | + - For dependency updates: `deps: ...` |
| 53 | + - For everything else: `chore: ...` |
| 54 | +1. Create a pull request |
| 55 | + |
| 56 | +Good to know: |
| 57 | + |
| 58 | +- There are no rules for commit messages. Write whatever you like! |
| 59 | + |
12 | 60 | ## How to release |
13 | 61 |
|
14 | | -- Wait for passing CI... |
15 | | -- ```bash |
16 | | - git switch main && git pull |
17 | | - ``` |
18 | | -- ```bash |
19 | | - npm run build -- --clean && npm run build |
20 | | - ``` |
21 | | -- ```bash |
22 | | - npx @changesets/cli version |
23 | | - ``` |
24 | | -- ```bash |
25 | | - npx @changesets/cli publish |
26 | | - ``` |
27 | | -- ```bash |
28 | | - git push --follow-tags |
29 | | - ``` |
| 62 | +css-modules-kit is released using [changesets](https://github.com/changesets/changesets) on CI. Please read the following workflow file. |
| 63 | + |
| 64 | +- https://github.com/mizdra/css-modules-kit/blob/main/.github/workflows/release.yml |
| 65 | + |
| 66 | +Merging a pull request titled "Version Packages" will trigger a release. |
| 67 | + |
| 68 | +- https://github.com/mizdra/css-modules-kit/pulls?q=is%3Apr+Version+Packages+in%3Atitle |
0 commit comments