Skip to content

Commit ea518da

Browse files
authored
fix some docs and add a very minimal general readme (#56)
* fix some docs and add a very minimal general readme * document python3 and coloaide usage * typo's
1 parent 569046f commit ea518da

File tree

9 files changed

+71
-12
lines changed

9 files changed

+71
-12
lines changed

CONTRIBUTING.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Found a problem? Want a new feature?
1212

1313
Remember, a bug is a _demonstrable problem_ caused by _our_ code.
1414

15+
_If this guide itself is not working or is not clear, please report it._
16+
1517
## Submitting Pull Requests
1618

1719
Pull requests are the greatest contributions, so be sure they are focused in
@@ -29,7 +31,12 @@ scope and avoid unrelated commits.
2931
git remote add upstream https://github.com/csstools/postcss-plugins.git
3032

3133
# Install the tools necessary for testing
34+
# Node 16 or higher is required to build and run tests.
35+
# There is config for nvm and volta to help you use the right version.
3236
npm install
37+
38+
# Do an initial build of everything to make sure local dependencies can be found.
39+
npm run build --workspaces
3340
```
3441

3542
2. Create a branch for your feature or fix:
@@ -42,10 +49,22 @@ scope and avoid unrelated commits.
4249
git checkout -b fix/something
4350
```
4451

45-
3. If your code follows our practices, then push your feature branch:
52+
3. Navigate to the plugin you want to contribute to.
53+
```bash
54+
# Navigate to a plugin directory
55+
cd plugins/<plugin-name>
56+
```
57+
```bash
58+
# Navigate to the postcss-preset-env directory
59+
cd plugin-packs/postcss-preset-env
60+
```
61+
62+
4. If your code follows our practices, then push your feature branch:
4663
```bash
64+
# Run the linter
65+
npm run lint
4766
# Test current code
48-
npm test
67+
npm run build && npm run test
4968
```
5069
```bash
5170
# Push the branch for your new feature

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
# TODO : make a README for this mono repo
1+
# PostCSS Plugins [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
2+
3+
[<img alt="build status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
4+
[<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]
5+
6+
[PostCSS Plugins] contains tools and plugins for [PostCSS Preset Env].
7+
8+
[PostCSS Preset Env] lets you convert modern CSS into something most browsers
9+
can understand, determining the polyfills you need based on your targeted
10+
browsers or runtime environments.
11+
12+
[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
13+
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
14+
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
15+
[git-url]: https://gitter.im/postcss/postcss
16+
17+
[PostCSS]: https://github.com/postcss/postcss
18+
[PostCSS Plugins]: https://github.com/csstools/postcss-plugins
19+
[PostCSS Preset Env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env

packages/base-cli/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ cli(
1818
),
1919
);
2020
```
21+
22+
[postcss]: https://github.com/postcss/postcss

plugin-packs/postcss-preset-env/INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ module.exports = {
186186
[PostCSS]: https://github.com/postcss/postcss
187187
[PostCSS CLI]: https://github.com/postcss/postcss-cli
188188
[PostCSS Loader]: https://github.com/postcss/postcss-loader
189-
[PostCSS Preset Env]: https://github.com/csstools/postcss-preset-env
189+
[PostCSS Preset Env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
190190
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
191191
[React App Rewired]: https://github.com/timarney/react-app-rewired
192192
[Rollup Plugin PostCSS]: https://github.com/egoist/rollup-plugin-postcss

plugin-packs/postcss-preset-env/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PostCSS Preset Env [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
22

33
[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-preset-env.svg" height="20">][npm-url]
4-
[<img alt="build status" src="https://github.com/csstools/postcss-preset-env/workflows/test/badge.svg" height="20">][cli-url]
4+
[<img alt="build status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
55
[<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]
66

77
[PostCSS Preset Env] lets you convert modern CSS into something most browsers
@@ -133,7 +133,7 @@ features.
133133

134134
The `features` option enables or disables specific polyfills by ID. Passing
135135
`true` to a specific feature ID will enable its polyfill, while passing `false`
136-
will disable it. [List of IDs](https://github.com/csstools/postcss-preset-env/blob/master/src/lib/plugins-by-id.js#L36)
136+
will disable it. [List of IDs](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/src/lib/plugins-by-id.js#L36)
137137

138138
```js
139139
postcssPresetEnv({
@@ -354,8 +354,8 @@ postcssPresetEnv({
354354
});
355355
```
356356

357-
[cli-img]: https://github.com/postcss/postcss-preset-env/workflows/test/badge.svg
358-
[cli-url]: https://github.com/postcss/postcss-preset-env/actions/workflows/test.yml?query=workflow/test
357+
[cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
358+
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
359359
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
360360
[git-url]: https://gitter.im/postcss/postcss
361361
[npm-img]: https://img.shields.io/npm/v/postcss-preset-env.svg
@@ -366,7 +366,7 @@ postcssPresetEnv({
366366
[caniuse]: https://caniuse.com/
367367
[cssdb]: https://cssdb.org/
368368
[PostCSS]: https://github.com/postcss/postcss
369-
[PostCSS Preset Env]: https://github.com/csstools/postcss-preset-env
369+
[PostCSS Preset Env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
370370
[readme-style-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-style-with-preset-env.svg
371371
[readme-style-with-preset-env-url]: https://codepen.io/pen?template=OZRovK
372372
[readme-transform-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-transform-with-preset-env.svg

plugins/postcss-env-function/INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,6 @@ grunt.initConfig({
157157
[PostCSS]: https://github.com/postcss/postcss
158158
[PostCSS CLI]: https://github.com/postcss/postcss-cli
159159
[PostCSS Loader]: https://github.com/postcss/postcss-loader
160-
[PostCSS Environment Variables]: https://github.com/csstools/postcss-env-function
160+
[PostCSS Environment Variables]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-env-function
161161
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
162162
[React App Rewired]: https://github.com/timarney/react-app-rewired

plugins/postcss-focus-visible/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-focus-visible.svg" height="20">][npm-url]
44
[<img alt="CSS Standard Status" src="https://cssdb.org/badge/focus-within-pseudo-class.svg" height="20">][css-url]
5-
[<img alt="Build Status" src="https://github.com/csstools/postcss-focus-visible/workflows/test/badge.svg" height="20">][cli-url]
5+
[<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
66
[<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]
77

88
[PostCSS Focus Visible] lets you use the `:focus-visible` pseudo-class in

plugins/postcss-lab-function/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"scripts": {
2323
"build": "rollup -c ../../rollup/default.js",
2424
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
25-
"generate-color-corpus": "python3 ./test/color/generate.py",
2625
"lint": "eslint src/**/*.ts src/**/*.js --no-error-on-unmatched-pattern",
2726
"prepublishOnly": "npm run clean && npm run build && npm run test",
2827
"stryker": "stryker run --logLevel error",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Color unit tests.
2+
3+
Reading :
4+
- https://github.com/w3c/csswg-drafts/issues/6816
5+
- https://github.com/csstools/postcss-lab-function/issues/7
6+
- https://github.com/w3c/csswg-drafts/issues/5191
7+
- https://facelessuser.github.io/coloraide/
8+
9+
At the moment there is still unspecified behavior around color conversion from `lab`|`lch` to `rgb` or `color()`
10+
11+
[coloraide](https://facelessuser.github.io/coloraide/) is used to mimic browser behavior.
12+
This allows us to quickly tweak the conversion and test the output against variants produced by coloraide.
13+
14+
coloraide requires `python3`.
15+
16+
```bash
17+
# USAGE:
18+
# python3 -m pip install coloraide
19+
# python3 ./test/color/generate.py
20+
```
21+

0 commit comments

Comments
 (0)