pnpm install
Run pnpm build
in the project root to build all packages:
pnpm build
Split a new terminal and switch to the target directory for testing to avoid running tests from other packages:
cd packages/core
pnpm test -- --watch
Taking the CSS project as an example, you can freely create a file like aron.test.ts in packages/core/tests/contributions for unit testing:
import { MasterCSS } from '../src'
it('should generated with `background-color:` instead of `background:`', () => {
expect(new MasterCSS().create('bg:red')?.declarations).toStrictEqual({ 'background-color': '#d11a1e' })
})
it('should contain the `:hover` selector', () => {
expect(new MasterCSS().create('fg:white:hover')?.text).toBe('.f\\:white\\:hover:hover{color:#ffffff}')
})
Commit your tests ( and create a Pull Request ):
Add @1aron tests
Follow the Techor ESLint Preset
pnpm lint
To automatically fix any violations in your code:
pnpm lint -- --fix
pnpm type-check
Follow the Techor Conventional Commits
pnpm commit-check
You have to pass pnpm check
before submitting a pull request.
pnpm check
The command includes all of the following checks:
pnpm build