To submit patches or features:
- Fork the repo
- Run
yarn install
ornpm install
- Make changes
- Build and run the CLI by
yarn run-cli
ornpm run run-cli
- Submit your changes via GitHub Pull Requests.
Commit messages follows the Conventional Commits style.
The code style is enforced by prettier and eslint rules and there is a pre-commit hooks setup that automatically fixes any fixable violations.
Check style violations by running:
yarn run lint && yarn run check-formatting
Fix formatting issues by running:
yarn run fix-formatting
First thing is to look at their release notes, then update tailwindcss and the default config file by running:
yarn add -D tailwindcss@^RELEASE_VERSION
yarn run updateConfig
This will update src/cli/lib/defaultTailwindConfig.ts
with the latest tailwind config and
the CLI will use this file to automatically generate the following classes:
- new pseudoclass variants e.g.
hover:flex
,focus:flex
,md:flex
etc. - new classnames that are based on new values in config. e.g. in tailwind v2 they added font sizing like
text-7xl
. the new config will have this value and thus will be generated by the CLI.
The above will update existing classes that got new values. For new classnames:
-
classes that their name cannot be customized should be added to
src/cli/lib/non-configurable/CORRESPONDING_CATEGORY.ts
. An example for these would beflex
,block
(non-configurable/layout) orcapitalize
(non-configurable/typography). -
classes that their name can be customized (like
bg-red-100
, sizing classesw-6
, etc.) each should be added to corresponding category method inClassnamesGenerator
class.
After doing this for new classes, the CLI would be compatible with new tailwind release.
Now src/index.ts
can be updated with the new types by running:
yarn run generate