English | Chinese
👋 Hello! Welcome use Fighting Design
!
I am glad that you are interested in contributing to Fighting Design
. Before submitting your contribution, be sure to take a moment to read the following guidelines.
There may be many specifications, but most of them are small specifications. Please read them carefully.
Before you make a contribution, you need to run the Fighting Design
project. Then you need to:
If you are ready, you can skip directly and start from here:
Fork
fighting-designClone Fork
items locally
Next, execute the command:
# Enter project directory
cd fighting-design
# Install dependencies
pnpm i
# Start development project
pnpm start
There are many commands set in Fighting Design
,You can see in package.json:
"scripts": {
"clean": "rimraf dist",
"start": "pnpm run -C start dev",
"dev:docs": "pnpm run -C docs dev",
"build": "run-s build:*",
"build:components": "vite build",
"build:theme": "vite build --config vite.config.css.ts",
"build:types": "vite build --config vite.config.types.ts",
"build:docs": "pnpm run -C docs build",
"serve:docs": "pnpm run -C docs serve",
"test": "vitest",
"prettier": "prettier --write ."
},
Each command is described in detail below
# Clean dist
pnpm clean
# Start development test project
pnpm start
# Start document project
pnpm dev:docs
# Build (the main build, after which is the package to be released)
pnpm build
# Build components
pnpm build:components
# Build component style theme
pnpm build:theme
# Build component type
pnpm build:type
# build documents
pnpm build:docs
# Run build document
pnpm serve:docs
# It is used to move files, and move some files that do not need to be packaged to the dist directory (basically not used)
pnpm move
# unit testing
pnpm test
# Code formatting
pnpm prettier
# Enable submit plug-in
pnpm commit
The main source files are in the fighting-design/packages
directory, and each subdirectory has a separate README.md
describes the specified directory. Refer to the following documents for detailed specifications of each module:
- fighting-components Component source file directory
- fighting-test Unit test directory
- fighting-theme Style theme catalog
- fighting-type Type catalog
- fighting-utils Tool function directory
The following is about the document specification:
Git allows us to attach a submission information as a description each time we submit. When we execute a commit
, we need to fill in the description information in strict accordance with the specification below. The submission information must be one of the following information, followed by the colon + space + information in English
For example:
git commit -m 'feat: Add XXX function'
The type must be one of the following types and filled in against the type description.
type | describe |
---|---|
build | build |
chore | Change the construction process or add dependent libraries, tools, etc |
ci | Ci related changes |
docs | Document change |
feat | new function |
fix | repair |
perf | performance optimization |
refactor | Code changes that neither fix errors nor add features |
revert | Release new version |
style | Tag, space, format, missing semicolon |
test | Add test / test case |
However, Fighting Design
has built-in commitlint plug-in to assist us in adding submission information, so we need to execute the following commands:
git add .
# Use the prompt of the plug-in to set the submission information
pnpm commit
git push
Before you submit PR
, please make sure that your fork
warehouse is the latest code to avoid conflicts.
Therefore, before submitting PR
, please be sure to pull the latest code, pull the latest code, and pull the latest code!
Please refer to COMMON_PROBLEM
You can also contact me directly
Development is not easy, welcome to sponsor!
Thank all those who have contributors to Fighting Design
!
Star
Fork