This is a guide for contributors.
Please read the slides about css-modules-kit (in Japanese).
npm install
npm run testnpm run build: Build for productionnpm run lint: Run static-checkingnpm run test: Run tests
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.
codegen (...): Debug forcodegenpackageeslint-plugin (...): Debug foreslint-pluginpackagestylelint (...): Debug forstylelintpackagevscode (...): Debug forvscodeandts-pluginpackagevscode-test: Debug fornpm run test:vscode
Good to know:
- You can set breakpoints in
*.tsfiles. - In VS Code, you can view the tsserver log with
F1 > TypeScript: Open TS Server log.- Runtime errors from
ts-pluginare output there.
- Runtime errors from
- In VS Code, you can view the Extension Host log with
F1 > Output: Show Output Channels... > Extension Host.- If the extension fails to load, the log will be output there.
Debugging Zed Extension is a bit tricky.
- Run
npm run build - Start
CMK_LOAD_LOCAL_TS_PLUGIN=0 zed examples/1-basic
Good to know:
- If
CMK_LOAD_LOCAL_TS_PLUGINis set to1, thets-pluginbuilt withnpm run buildwill be loaded.- When it is not
1, thets-plugindownloaded from npmjs.com is loaded.
- When it is not
- In Zed, you can view the tsserver log with
F1 > dev: Open language server logs > vtsls (1-basic). - When you start zed with the
--foregroundoption, you can view the stdout of the Extension.- e.g.
CMK_LOAD_LOCAL_TS_PLUGIN=0 zed --foreground examples/1-basic
- e.g.
- Write your code
- Add tests if necessary
- Update documentation if necessary
- Pass
npm run lintandnpm run test - Run
npx @changesets/cli addto create a changeset if the change affects users- The summary should be in the following format:
- For bug fixes:
fix: ... - For new features:
feat: ... - For dependency updates:
deps: ... - For everything else:
chore: ...
- For bug fixes:
- The summary should be in the following format:
- Create a pull request
Good to know:
- There are no rules for commit messages. Write whatever you like!
css-modules-kit is released using changesets on CI. Please read the following workflow file.
Merging a pull request titled "Version Packages" will trigger a release.