Thanks for your interest in contributing! Please read carefully through our guidelines below to ensure that your contribution adheres to our project's standards.
We use GitHub Issues to track all tasks related to this project.
In order to contribute to windicss, you must first get a copy of the project running locally on your computer.
There are five steps to building this project:
- Set up Git and Install Node.js
- Fork the repository
- Clone your fork
- Install dependencies
- Build the project
All GitHub projects are backed by a version control software called Git. You'll need to set up Git in order to contribute to any project on GitHub.
This specific project is written in JavaScript and uses Node.js as it's runtime. You'll need to install Node.js in order to run the project.
Fork the repository
A fork is a copy of a repository. Forking a repository lets you to make changes to your copy without affecting any of the original code.
Click Fork (in the top-right corner of the page) to copy this repository to your GitHub account.
Use git to clone your fork to your computer.
git clone https://github.com/${username}/windicss.git
This project uses pnpm, a command-line tool bundled with Node.js, to maintain third-party dependencies.
First, navigate into the project's directory
cd windicss
Next, use pnpm
to install the project' dependencies
pnpm install
Development Version
pnpm build
Production Version
pnpm build:prod
After you successfully build the project, you can make some changes of your own.
There are five steps to submit pull request:
git branch fix-issue-123
git checkout fix-issue-123
Make sure your code is following TypeScript Style Guide.
Lint your code:
pnpm lint
You should add a new test file for your changes into test folder, the file should has extension .test.ts
.
Run tests:
pnpm test
Generate coverage report:
pnpm coverage
To test the changes you made, you can use the playground
project.
-
In the windicss root project directory, run:
pnpm install
-
In the first terminal, run
pnpm dev
in the windicss project directory, and in the second one open the playground directory and runpnpm dev
.This would set up a watcher that would rebuild the
windi.css
file in theplayground
directory every time you make a change in the windicss source code. You would need something like Live Server to see your changes in the browser.
Open two editors, one with the windicss repo, one with your actual project.
git add .
git commit -m "fix issue 123"
git push origin fix-issue-123
- Find the New Pull Request button
- Select the option to compare across forks
- Select your fork(${username}/windicss) in the
head repository
option - Select your branch in the
compare
option - Click Create Pull Request
By contributing, you agree that your contributions will be licensed under its MIT license.