Skip to content

Commit 07139da

Browse files
committed
Add contributing notes
1 parent 3156c66 commit 07139da

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

.github/CONTRIBUTING.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to Tailwind CSS! Please take a moment to review this document **before submitting a pull request**.
4+
5+
## Pull requests
6+
7+
**Please ask first before starting work on any significant new features.**
8+
9+
It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create [an issue](https://github.com/tailwindcss/tailwindcss/issues) to first discuss any significant new features. This includes things like adding new utilities, creating new at-rules, or adding new component examples to the documentation.
10+
11+
## Coding standards
12+
13+
Our code formatting rules are defined in [.eslintrc](https://github.com/tailwindcss/tailwindcss/blob/master/.eslintrc). You can check your code against these standards by running:
14+
15+
```sh
16+
npm run style
17+
```
18+
19+
To automatically fix any style violations in your code, you can run:
20+
21+
```sh
22+
npm run style --fix
23+
```
24+
25+
## Running tests
26+
27+
You can run the test suite using the following commands:
28+
29+
```sh
30+
npm test
31+
```
32+
33+
Please ensure that the tests are passing when submitting a pull request. If you're adding new features to Tailwind, please include tests.
34+
35+
## Building the documentation
36+
37+
Tailwind uses the [Jigsaw](http://jigsaw.tighten.co/) static site generator for its documentation. Here is how you can generate the documentation locally:
38+
39+
1. Go to your Tailwind folder
40+
41+
```sh
42+
cd tailwindcss
43+
```
44+
45+
2. Install JS dependencies
46+
47+
```sh
48+
npm install
49+
```
50+
51+
3. Transpile the source code
52+
53+
```sh
54+
npm run prepare
55+
```
56+
57+
4. Go to docs folder
58+
59+
```sh
60+
cd docs
61+
```
62+
63+
5. Install PHP dependencies for docs (requires Composer: https://getcomposer.org)
64+
65+
```sh
66+
composer install
67+
```
68+
69+
6. Install JS dependencies for docs
70+
71+
```sh
72+
npm install
73+
```
74+
75+
7. Run the build to generate the static site
76+
77+
```sh
78+
npm run dev
79+
```
80+
81+
8. View the static site at `/tailwind/docs/build_local`, or you can run the Jigsaw server:
82+
83+
```sh
84+
./vendor/bin/jigsaw serve
85+
```

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ A utility-first CSS framework for rapidly building custom user interfaces.
77
## Documentation
88

99
For full documentation, visit: https://tailwindcss.com/
10+
11+
## Contributing
12+
13+
If you are interested in contributing to Tailwind, please take a moment to read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/master/.github/CONTRIBUTING.md) **before submitting a pull request**.

0 commit comments

Comments
 (0)