From 0a8a3ce1d642ab2690b6662a0ecbd56ce3b313fe Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 19:54:39 +0300 Subject: [PATCH 01/24] Add index.md --- docs/index.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/index.md diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..8dd962d18 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,47 @@ +**Index** +* [PostCSS Architecture](https://github.com/postcss/postcss/blob/main/docs/architecture.md#postcss-architecture) + * [Overview](https://github.com/postcss/postcss/blob/main/docs/architecture.md#overview) + * [Workflow](https://github.com/postcss/postcss/blob/main/docs/architecture.md#workflow) + * [Core Structures](https://github.com/postcss/postcss/blob/main/docs/architecture.md#core-structures) + * [API Reference](https://github.com/postcss/postcss/blob/main/docs/architecture.md#api-reference + +* [PostCSS Plugins](https://github.com/postcss/postcss/blob/main/docs/plugins.md#postcss-plugins) + * [Control](https://github.com/postcss/postcss/blob/main/docs/plugins.md#control) + * [Packs](https://github.com/postcss/postcss/blob/main/docs/plugins.md#packs) + * [Future CSS Syntax](https://github.com/postcss/postcss/blob/main/docs/plugins.md#future-css-syntax) + * [Fallbacks](https://github.com/postcss/postcss/blob/main/docs/plugins.md#fallbacks) + * [Language Extensions](https://github.com/postcss/postcss/blob/main/docs/plugins.md#language-extensions) + * [Colors](https://github.com/postcss/postcss/blob/main/docs/plugins.md#colors) + * [Images and Fonts](https://github.com/postcss/postcss/blob/main/docs/plugins.md#images-and-fonts) + * [Grids](https://github.com/postcss/postcss/blob/main/docs/plugins.md#grids) + * [Optimizations](https://github.com/postcss/postcss/blob/main/docs/plugins.md#optimizations) + * [Shortcuts](https://github.com/postcss/postcss/blob/main/docs/plugins.md#shortcuts) + * [Others](https://github.com/postcss/postcss/blob/main/docs/plugins.md#others) + * [Analysis](https://github.com/postcss/postcss/blob/main/docs/plugins.md#analysis) + * [Reporters](https://github.com/postcss/postcss/blob/main/docs/plugins.md#reporters) + * [Fun](https://github.com/postcss/postcss/blob/main/docs/plugins.md#fun) + +* [PostCSS and Source Maps](https://github.com/postcss/postcss/blob/main/docs/source-maps.md#postcss-and-source-maps) + +* [How to Write Custom Syntax](https://github.com/postcss/postcss/blob/main/docs/syntax.md#how-to-write-custom-syntax) + * [Syntax](https://github.com/postcss/postcss/blob/main/docs/syntax.md#syntax) + * [Parser](https://github.com/postcss/postcss/blob/main/docs/syntax.md#parser) + * [Main Theory](https://github.com/postcss/postcss/blob/main/docs/syntax.md#main-theory) + * [Performance](https://github.com/postcss/postcss/blob/main/docs/syntax.md#performance) + * [Node Source](https://github.com/postcss/postcss/blob/main/docs/syntax.md#node-source) + * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values) + * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests) + * [Stringifier](https://github.com/postcss/postcss/blob/main/docs/syntax.md#stringifier) + * [Main Theory](https://github.com/postcss/postcss/blob/main/docs/syntax.md#main-theory-1) + * [Builder Function](https://github.com/postcss/postcss/blob/main/docs/syntax.md#builder-function) + * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values-1) + * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests-1) + +* [Writing a PostCSS Plugin] + * [Links](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#links) + * [Step 1: Create an idea](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-1-create-an-idea) + * [Step 2: Create a project](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-2-create-a-project) + * [Step 3: Find nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-3-find-nodes) + * [Step 4: Change nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-4-change-nodes) + * [Step 5: Fight with frustration](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-5-fight-with-frustration) + * [Step 6: Make it public](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-6-make-it-public) From c0f0b0a89459b676613efbfa1b1a529d8ceeeb43 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 19:56:56 +0300 Subject: [PATCH 02/24] fix typos --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 8dd962d18..c2469386f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,7 +3,7 @@ * [Overview](https://github.com/postcss/postcss/blob/main/docs/architecture.md#overview) * [Workflow](https://github.com/postcss/postcss/blob/main/docs/architecture.md#workflow) * [Core Structures](https://github.com/postcss/postcss/blob/main/docs/architecture.md#core-structures) - * [API Reference](https://github.com/postcss/postcss/blob/main/docs/architecture.md#api-reference + * [API Reference](https://github.com/postcss/postcss/blob/main/docs/architecture.md#api-reference) * [PostCSS Plugins](https://github.com/postcss/postcss/blob/main/docs/plugins.md#postcss-plugins) * [Control](https://github.com/postcss/postcss/blob/main/docs/plugins.md#control) @@ -37,7 +37,7 @@ * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values-1) * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests-1) -* [Writing a PostCSS Plugin] +* [Writing a PostCSS Plugin](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#writing-a-postcss-plugin) * [Links](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#links) * [Step 1: Create an idea](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-1-create-an-idea) * [Step 2: Create a project](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-2-create-a-project) From 3addecca5ba3b8c2c0925811ca8d7ce4453c5dbc Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 19:58:28 +0300 Subject: [PATCH 03/24] fix spacing --- docs/index.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/index.md b/docs/index.md index c2469386f..25a365338 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,6 +5,7 @@ * [Core Structures](https://github.com/postcss/postcss/blob/main/docs/architecture.md#core-structures) * [API Reference](https://github.com/postcss/postcss/blob/main/docs/architecture.md#api-reference) + * [PostCSS Plugins](https://github.com/postcss/postcss/blob/main/docs/plugins.md#postcss-plugins) * [Control](https://github.com/postcss/postcss/blob/main/docs/plugins.md#control) * [Packs](https://github.com/postcss/postcss/blob/main/docs/plugins.md#packs) @@ -21,8 +22,10 @@ * [Reporters](https://github.com/postcss/postcss/blob/main/docs/plugins.md#reporters) * [Fun](https://github.com/postcss/postcss/blob/main/docs/plugins.md#fun) + * [PostCSS and Source Maps](https://github.com/postcss/postcss/blob/main/docs/source-maps.md#postcss-and-source-maps) + * [How to Write Custom Syntax](https://github.com/postcss/postcss/blob/main/docs/syntax.md#how-to-write-custom-syntax) * [Syntax](https://github.com/postcss/postcss/blob/main/docs/syntax.md#syntax) * [Parser](https://github.com/postcss/postcss/blob/main/docs/syntax.md#parser) @@ -32,16 +35,16 @@ * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values) * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests) * [Stringifier](https://github.com/postcss/postcss/blob/main/docs/syntax.md#stringifier) - * [Main Theory](https://github.com/postcss/postcss/blob/main/docs/syntax.md#main-theory-1) - * [Builder Function](https://github.com/postcss/postcss/blob/main/docs/syntax.md#builder-function) - * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values-1) - * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests-1) + * [Main Theory](https://github.com/postcss/postcss/blob/main/docs/syntax.md#main-theory-1) + * [Builder Function](https://github.com/postcss/postcss/blob/main/docs/syntax.md#builder-function) + * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values-1) + * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests-1) * [Writing a PostCSS Plugin](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#writing-a-postcss-plugin) - * [Links](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#links) - * [Step 1: Create an idea](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-1-create-an-idea) - * [Step 2: Create a project](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-2-create-a-project) - * [Step 3: Find nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-3-find-nodes) - * [Step 4: Change nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-4-change-nodes) - * [Step 5: Fight with frustration](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-5-fight-with-frustration) - * [Step 6: Make it public](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-6-make-it-public) + * [Links](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#links) + * [Step 1: Create an idea](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-1-create-an-idea) + * [Step 2: Create a project](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-2-create-a-project) + * [Step 3: Find nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-3-find-nodes) + * [Step 4: Change nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-4-change-nodes) + * [Step 5: Fight with frustration](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-5-fight-with-frustration) + * [Step 6: Make it public](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-6-make-it-public) From d02f9336034009386ba13e29a352be674feb8049 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 19:59:30 +0300 Subject: [PATCH 04/24] fix lines b/w paragraphs --- docs/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/index.md b/docs/index.md index 25a365338..4c10f6698 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,8 +4,6 @@ * [Workflow](https://github.com/postcss/postcss/blob/main/docs/architecture.md#workflow) * [Core Structures](https://github.com/postcss/postcss/blob/main/docs/architecture.md#core-structures) * [API Reference](https://github.com/postcss/postcss/blob/main/docs/architecture.md#api-reference) - - * [PostCSS Plugins](https://github.com/postcss/postcss/blob/main/docs/plugins.md#postcss-plugins) * [Control](https://github.com/postcss/postcss/blob/main/docs/plugins.md#control) * [Packs](https://github.com/postcss/postcss/blob/main/docs/plugins.md#packs) @@ -21,11 +19,8 @@ * [Analysis](https://github.com/postcss/postcss/blob/main/docs/plugins.md#analysis) * [Reporters](https://github.com/postcss/postcss/blob/main/docs/plugins.md#reporters) * [Fun](https://github.com/postcss/postcss/blob/main/docs/plugins.md#fun) - - * [PostCSS and Source Maps](https://github.com/postcss/postcss/blob/main/docs/source-maps.md#postcss-and-source-maps) - * [How to Write Custom Syntax](https://github.com/postcss/postcss/blob/main/docs/syntax.md#how-to-write-custom-syntax) * [Syntax](https://github.com/postcss/postcss/blob/main/docs/syntax.md#syntax) * [Parser](https://github.com/postcss/postcss/blob/main/docs/syntax.md#parser) @@ -39,7 +34,6 @@ * [Builder Function](https://github.com/postcss/postcss/blob/main/docs/syntax.md#builder-function) * [Raw Values](https://github.com/postcss/postcss/blob/main/docs/syntax.md#raw-values-1) * [Tests](https://github.com/postcss/postcss/blob/main/docs/syntax.md#tests-1) - * [Writing a PostCSS Plugin](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#writing-a-postcss-plugin) * [Links](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#links) * [Step 1: Create an idea](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-1-create-an-idea) From b80938280b2dff7136b71003a65cf01816700484 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:20:05 +0300 Subject: [PATCH 05/24] add index for guidlines --- docs/index.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/index.md b/docs/index.md index 4c10f6698..bbb9c4938 100644 --- a/docs/index.md +++ b/docs/index.md @@ -42,3 +42,46 @@ * [Step 4: Change nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-4-change-nodes) * [Step 5: Fight with frustration](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-5-fight-with-frustration) * [Step 6: Make it public](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-6-make-it-public) +**Guidlines** +* [PostCSS Plugin Guidelines](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#postcss-plugin-guidelines) + * [API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#1-api) + * [1.1 Clear name with `postcss-` prefix](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#11-clear-name-with-postcss--prefix) + * [1.2. Do one thing, and do it well](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#12-do-one-thing-and-do-it-well) + * [1.3. Do not use mixins](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#13-do-not-use-mixins) + * [1.4. Keep `postcss` to `peerDependencies`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#14-keep-postcss-to-peerdependencies) + * [1.5. Set `plugin.postcssPlugin` with plugin name](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#15-set-pluginpostcssplugin-with-plugin-name) + * [Processing](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#2-processing) + * [2.1. Plugin must be tested](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#21-plugin-must-be-tested) + * [2.2. Use asynchronous methods whenever possible](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#22-use-asynchronous-methods-whenever-possible) + * [2.3. Use fast node’s scanning](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#23-use-fast-nodes-scanning) + * [2.4. Set `node.source` for new nodes](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#24-set-nodesource-for-new-nodes) + * [2.5. Use only the public PostCSS API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#25-use-only-the-public-postcss-api) + * [Dependencies](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#3-dependencies) + * [3.1. Use messages to specify dependencies](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#31-use-messages-to-specify-dependencies) + * [Errors](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#4-errors) + * [4.1. Use `node.error` on CSS relevant errors](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#41-use-nodeerror-on-css-relevant-errors) + * [4.2. Use `result.warn` for warnings](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#42-use-resultwarn-for-warnings) + * [Documentation](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#5-documentation) + * [5.1. Document your plugin in English](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#51-document-your-plugin-in-english) + * [5.2. Include input and output examples](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#52-include-input-and-output-examples) + * [5.3. Maintain a changelog](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#53-maintain-a-changelog) + * [5.4. Include `postcss-plugin` keyword in `package.json`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#54-include-postcss-plugin-keyword-in-packagejson) + + [PostCSS Runner Guidelines](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#postcss-runner-guidelines) + * [API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#1-api) + * [1.1. Accept functions in plugin parameters](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#11-accept-functions-in-plugin-parameters) + * [Processing](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#21-set-from-and-to-processing-options) + * [2.1. Set `from` and `to` processing options](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#21-set-from-and-to-processing-options) + * [2.2. Use only the asynchronous API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#22-use-only-the-asynchronous-api) + * [2.3. Use only the public PostCSS API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#23-use-only-the-public-postcss-api) + * [Dependencies](https) + * [3.1. Rebuild when dependencies change](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#31-rebuild-when-dependencies-change) + * [Output](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#4-output) + * [4.1. Don’t show JS stack for `CssSyntaxError`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#41-dont-show-js-stack-for-csssyntaxerror) + * [4.2. Display `result.warnings()`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#42-display-resultwarnings) + * [4.3. Allow the user to write source maps to different files](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#43-allow-the-user-to-write-source-maps-to-different-files) + * [Documentation](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#4-output) + * [5.1. Document your runner in English](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#51-document-your-runner-in-english) + * [5.2. Maintain a changelog](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#52-maintain-a-changelog) + * [5.3. `postcss-runner` keyword in `package.json`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#53-postcss-runner-keyword-in-packagejson) + * [5.4. Keep postcss to peerDependencies](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#54-keep-postcss-to-peerdependencies) From 5ab136eae4152274df4c676cebc30a0abfc2c8d7 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:22:21 +0300 Subject: [PATCH 06/24] fix spacing --- docs/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index bbb9c4938..b3c1acada 100644 --- a/docs/index.md +++ b/docs/index.md @@ -42,6 +42,7 @@ * [Step 4: Change nodes](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-4-change-nodes) * [Step 5: Fight with frustration](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-5-fight-with-frustration) * [Step 6: Make it public](https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md#step-6-make-it-public) + **Guidlines** * [PostCSS Plugin Guidelines](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#postcss-plugin-guidelines) * [API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#1-api) @@ -67,7 +68,7 @@ * [5.3. Maintain a changelog](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#53-maintain-a-changelog) * [5.4. Include `postcss-plugin` keyword in `package.json`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/plugin.md#54-include-postcss-plugin-keyword-in-packagejson) - [PostCSS Runner Guidelines](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#postcss-runner-guidelines) +* [PostCSS Runner Guidelines](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#postcss-runner-guidelines) * [API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#1-api) * [1.1. Accept functions in plugin parameters](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#11-accept-functions-in-plugin-parameters) * [Processing](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#21-set-from-and-to-processing-options) From 7dece8f5f005c0a03b5993df7a956f7d3bd9fedc Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:29:42 +0300 Subject: [PATCH 07/24] table of contents for plugins.md --- docs/plugins.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/plugins.md b/docs/plugins.md index 3df2b38c4..28dfb2759 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -1,5 +1,23 @@ # PostCSS Plugins +**Table of Contents** + +* [PostCSS Plugins](#postcss-plugins) + * [Control](#control) + * [Packs](#packs) + * [Control](#control) + * [Future CSS Syntax](#future-css-syntax) + * [Fallbacks](#fallbacks) + * [Language Extensions](#language-extensions) + * [Images and Fonts](#images-and-fonts) + * [Grids](#grids) + * [Optimizations](#optimizations) + * [Shortcuts](#shortcuts) + * [Others](#others) + * [Analysis](#analysis) + * [Reporters](#reporters) + * [Fun](#fun) + ## Control There are two ways to make PostCSS magic more explicit. From b092d273a6b2379443c82ae9f378ff9b0571ccea Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:36:25 +0300 Subject: [PATCH 08/24] table of contents for syntax.md --- docs/syntax.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/syntax.md b/docs/syntax.md index 5b5432896..a93b5e1d5 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -1,5 +1,19 @@ # How to Write Custom Syntax +* [How to Write Custom Syntax](#how-to-write-custom-syntax) + * [Syntax](#syntax) + * [Parser](#parser) + * [Main Theory](#main-theory) + * [Performance](#performance)) + * [Node Source](#node-source) + * [Raw Values](#raw-values) + * [Tests](#tests) + * [Stringifier](#stringifier) + * [Main Theory](#main-theory-1) + * [Builder Function](#builder-function) + * [Raw Values](#raw-values-1) + * [Tests](#tests-1) + PostCSS can transform styles in any syntax, and is not limited to just CSS. By writing a custom syntax, you can transform styles in any desired format. From 7934341bfbafe7317dd08dcc6f6f6f5373b89013 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:37:39 +0300 Subject: [PATCH 09/24] add title to table of contents --- docs/syntax.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/syntax.md b/docs/syntax.md index a93b5e1d5..d858fe402 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -1,5 +1,7 @@ # How to Write Custom Syntax +**Table of Contents** + * [How to Write Custom Syntax](#how-to-write-custom-syntax) * [Syntax](#syntax) * [Parser](#parser) From a555971d746ed401ae62c878094c41420f42689d Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:38:51 +0300 Subject: [PATCH 10/24] move table of contents further down --- docs/syntax.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/syntax.md b/docs/syntax.md index d858fe402..9fdca30f4 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -1,5 +1,17 @@ # How to Write Custom Syntax +PostCSS can transform styles in any syntax, and is not limited to just CSS. +By writing a custom syntax, you can transform styles in any desired format. + +Writing a custom syntax is much harder than writing a PostCSS plugin, but +it is an awesome adventure. + +There are 3 types of PostCSS syntax packages: + +* **Parser** to parse input string to node’s tree. +* **Stringifier** to generate output string by node’s tree. +* **Syntax** contains both parser and stringifier. + **Table of Contents** * [How to Write Custom Syntax](#how-to-write-custom-syntax) @@ -16,19 +28,6 @@ * [Raw Values](#raw-values-1) * [Tests](#tests-1) -PostCSS can transform styles in any syntax, and is not limited to just CSS. -By writing a custom syntax, you can transform styles in any desired format. - -Writing a custom syntax is much harder than writing a PostCSS plugin, but -it is an awesome adventure. - -There are 3 types of PostCSS syntax packages: - -* **Parser** to parse input string to node’s tree. -* **Stringifier** to generate output string by node’s tree. -* **Syntax** contains both parser and stringifier. - - ## Syntax A good example of a custom syntax is [SCSS]. Some users may want to transform From 121dff80a195a31538ff54ce6a5f6308759bed56 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:43:51 +0300 Subject: [PATCH 11/24] rable of contents for writing-a-plugin.md --- docs/writing-a-plugin.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/writing-a-plugin.md b/docs/writing-a-plugin.md index 8afa7f279..8255a7062 100644 --- a/docs/writing-a-plugin.md +++ b/docs/writing-a-plugin.md @@ -1,5 +1,14 @@ # Writing a PostCSS Plugin +* [Writing a PostCSS Plugin](#writing-a-postcss-plugin) + * [Links](#links) + * [Step 1: Create an idea](#step-1-create-an-idea) + * [Step 2: Create a project](#step-2-create-a-project) + * [Step 3: Find nodes](#step-3-find-nodes) + * [Step 4: Change nodes](#step-4-change-nodes) + * [Step 5: Fight with frustration](#step-5-fight-with-frustration) + * [Step 6: Make it public](#step-6-make-it-public) + ## Links Documentation: From b9f04dc417fbaf4c08d8d2c415e4e7634c4ca220 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:47:56 +0300 Subject: [PATCH 12/24] table of contents for plugin.md --- docs/guidelines/plugin.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/guidelines/plugin.md b/docs/guidelines/plugin.md index 88a0ed497..167797f1e 100644 --- a/docs/guidelines/plugin.md +++ b/docs/guidelines/plugin.md @@ -9,6 +9,31 @@ See also [ClojureWerkz’s recommendations] for open source projects. [ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/ +**Table of Contents** + +* [PostCSS Plugin Guidelines](#postcss-plugin-guidelines) + * [API](#1-api) + * [1.1 Clear name with `postcss-` prefix](#11-clear-name-with-postcss--prefix) + * [1.2. Do one thing, and do it well](#12-do-one-thing-and-do-it-well) + * [1.3. Do not use mixins](#13-do-not-use-mixins) + * [1.4. Keep `postcss` to `peerDependencies`](#14-keep-postcss-to-peerdependencies) + * [1.5. Set `plugin.postcssPlugin` with plugin name](#15-set-pluginpostcssplugin-with-plugin-name) + * [Processing](#2-processing) + * [2.1. Plugin must be tested](#21-plugin-must-be-tested) + * [2.2. Use asynchronous methods whenever possible](#22-use-asynchronous-methods-whenever-possible) + * [2.3. Use fast node’s scanning](#23-use-fast-nodes-scanning) + * [2.4. Set `node.source` for new nodes](#24-set-nodesource-for-new-nodes) + * [2.5. Use only the public PostCSS API](#25-use-only-the-public-postcss-api) + * [Dependencies](#3-dependencies) + * [3.1. Use messages to specify dependencies](#31-use-messages-to-specify-dependencies) + * [Errors](#4-errors) + * [4.1. Use `node.error` on CSS relevant errors](#41-use-nodeerror-on-css-relevant-errors) + * [4.2. Use `result.warn` for warnings](#42-use-resultwarn-for-warnings) + * [Documentation](#5-documentation) + * [5.1. Document your plugin in English](#51-document-your-plugin-in-english) + * [5.2. Include input and output examples](#52-include-input-and-output-examples) + * [5.3. Maintain a changelog](#53-maintain-a-changelog) + * [5.4. Include `postcss-plugin` keyword in `package.json`](#54-include-postcss-plugin-keyword-in-packagejson) ## 1. API From 6b4e5e19c99b4b9c6983c40e5a10ef94fc0c8cf7 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:50:05 +0300 Subject: [PATCH 13/24] fix typo --- docs/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index b3c1acada..d58c63802 100644 --- a/docs/index.md +++ b/docs/index.md @@ -75,7 +75,6 @@ * [2.1. Set `from` and `to` processing options](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#21-set-from-and-to-processing-options) * [2.2. Use only the asynchronous API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#22-use-only-the-asynchronous-api) * [2.3. Use only the public PostCSS API](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#23-use-only-the-public-postcss-api) - * [Dependencies](https) * [3.1. Rebuild when dependencies change](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#31-rebuild-when-dependencies-change) * [Output](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#4-output) * [4.1. Don’t show JS stack for `CssSyntaxError`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#41-dont-show-js-stack-for-csssyntaxerror) From b2871cb363a13f8dda4f5ed31fee76f655a0dbf9 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:52:24 +0300 Subject: [PATCH 14/24] fix wrong link --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index d58c63802..08a97f260 100644 --- a/docs/index.md +++ b/docs/index.md @@ -80,7 +80,7 @@ * [4.1. Don’t show JS stack for `CssSyntaxError`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#41-dont-show-js-stack-for-csssyntaxerror) * [4.2. Display `result.warnings()`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#42-display-resultwarnings) * [4.3. Allow the user to write source maps to different files](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#43-allow-the-user-to-write-source-maps-to-different-files) - * [Documentation](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#4-output) + * [Documentation](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#5-documentation) * [5.1. Document your runner in English](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#51-document-your-runner-in-english) * [5.2. Maintain a changelog](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#52-maintain-a-changelog) * [5.3. `postcss-runner` keyword in `package.json`](https://github.com/muddv/postcss/blob/docs-index/docs/guidelines/runner.md#53-postcss-runner-keyword-in-packagejson) From 770947fd115beef1fa5cdeddd413d07399584a20 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 20:53:34 +0300 Subject: [PATCH 15/24] table of contetns for runner.md --- docs/guidelines/runner.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/guidelines/runner.md b/docs/guidelines/runner.md index 30abab2a4..624a10823 100644 --- a/docs/guidelines/runner.md +++ b/docs/guidelines/runner.md @@ -14,6 +14,25 @@ See also [ClojureWerkz’s recommendations] for open source projects. [`gulp‑postcss`]: https://github.com/w0rm/gulp-postcss [`postcss-cli`]: https://github.com/postcss/postcss-cli +**Table of Contents** + +* [PostCSS Runner Guidelines](#postcss-runner-guidelines) + * [API](#1-api) + * [1.1. Accept functions in plugin parameters](#11-accept-functions-in-plugin-parameters) + * [Processing](#21-set-from-and-to-processing-options) + * [2.1. Set `from` and `to` processing options](#21-set-from-and-to-processing-options) + * [2.2. Use only the asynchronous API](#22-use-only-the-asynchronous-api) + * [2.3. Use only the public PostCSS API](#23-use-only-the-public-postcss-api) + * [3.1. Rebuild when dependencies change](#31-rebuild-when-dependencies-change) + * [Output](#4-output) + * [4.1. Don’t show JS stack for `CssSyntaxError`](#41-dont-show-js-stack-for-csssyntaxerror) + * [4.2. Display `result.warnings()`](#42-display-resultwarnings) + * [4.3. Allow the user to write source maps to different files](#43-allow-the-user-to-write-source-maps-to-different-files) + * [Documentation](#5-output) + * [5.1. Document your runner in English](#51-document-your-runner-in-english) + * [5.2. Maintain a changelog](#52-maintain-a-changelog) + * [5.3. `postcss-runner` keyword in `package.json`](#53-postcss-runner-keyword-in-packagejson) + * [5.4. Keep postcss to peerDependencies](#54-keep-postcss-to-peerdependencies) ## 1. API From 9798c7340d69b86e770ee905e8e143fac266a6d1 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:15:20 +0300 Subject: [PATCH 16/24] delete root link --- docs/architecture.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index 9b124b4f5..0f6a6f561 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -4,8 +4,6 @@ General overview of the PostCSS architecture. It can be useful for everyone who wishes to contribute to the core or develop a better understanding of the tool. **Table of Contents** - -* [PostCSS Architecture](#postcss-architecture) * [Overview](#overview) * [Workflow](#workflow) * [Core Structures](#core-structures) From aaf5455d677dc6737b68c3b02d4450b9d93fc823 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:17:41 +0300 Subject: [PATCH 17/24] delete root link --- docs/plugins.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/docs/plugins.md b/docs/plugins.md index 28dfb2759..80fcd5ade 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -2,21 +2,20 @@ **Table of Contents** -* [PostCSS Plugins](#postcss-plugins) - * [Control](#control) - * [Packs](#packs) - * [Control](#control) - * [Future CSS Syntax](#future-css-syntax) - * [Fallbacks](#fallbacks) - * [Language Extensions](#language-extensions) - * [Images and Fonts](#images-and-fonts) - * [Grids](#grids) - * [Optimizations](#optimizations) - * [Shortcuts](#shortcuts) - * [Others](#others) - * [Analysis](#analysis) - * [Reporters](#reporters) - * [Fun](#fun) +* [Control](#control) +* [Packs](#packs) +* [Control](#control) +* [Future CSS Syntax](#future-css-syntax) +* [Fallbacks](#fallbacks) +* [Language Extensions](#language-extensions) +* [Images and Fonts](#images-and-fonts) +* [Grids](#grids) +* [Optimizations](#optimizations) +* [Shortcuts](#shortcuts) +* [Others](#others) +* [Analysis](#analysis) +* [Reporters](#reporters) +* [Fun](#fun) ## Control From 8db2a67308554268b73777a089eda821f8bd3c62 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:19:14 +0300 Subject: [PATCH 18/24] delete root link --- docs/syntax.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/syntax.md b/docs/syntax.md index 9fdca30f4..d722b4319 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -14,19 +14,18 @@ There are 3 types of PostCSS syntax packages: **Table of Contents** -* [How to Write Custom Syntax](#how-to-write-custom-syntax) - * [Syntax](#syntax) - * [Parser](#parser) - * [Main Theory](#main-theory) - * [Performance](#performance)) - * [Node Source](#node-source) - * [Raw Values](#raw-values) - * [Tests](#tests) - * [Stringifier](#stringifier) - * [Main Theory](#main-theory-1) - * [Builder Function](#builder-function) - * [Raw Values](#raw-values-1) - * [Tests](#tests-1) +* [Syntax](#syntax) +* [Parser](#parser) + * [Main Theory](#main-theory) + * [Performance](#performance)) + * [Node Source](#node-source) + * [Raw Values](#raw-values) + * [Tests](#tests) +* [Stringifier](#stringifier) + * [Main Theory](#main-theory-1) + * [Builder Function](#builder-function) + * [Raw Values](#raw-values-1) + * [Tests](#tests-1) ## Syntax From d13ebb6109ca5a8b3086b8a9453276375ceb794f Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:19:46 +0300 Subject: [PATCH 19/24] delete root link --- docs/writing-a-plugin.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/writing-a-plugin.md b/docs/writing-a-plugin.md index 8255a7062..c30d05d23 100644 --- a/docs/writing-a-plugin.md +++ b/docs/writing-a-plugin.md @@ -1,13 +1,12 @@ # Writing a PostCSS Plugin -* [Writing a PostCSS Plugin](#writing-a-postcss-plugin) - * [Links](#links) - * [Step 1: Create an idea](#step-1-create-an-idea) - * [Step 2: Create a project](#step-2-create-a-project) - * [Step 3: Find nodes](#step-3-find-nodes) - * [Step 4: Change nodes](#step-4-change-nodes) - * [Step 5: Fight with frustration](#step-5-fight-with-frustration) - * [Step 6: Make it public](#step-6-make-it-public) +* [Links](#links) +* [Step 1: Create an idea](#step-1-create-an-idea) +* [Step 2: Create a project](#step-2-create-a-project) +* [Step 3: Find nodes](#step-3-find-nodes) +* [Step 4: Change nodes](#step-4-change-nodes) +* [Step 5: Fight with frustration](#step-5-fight-with-frustration) +* [Step 6: Make it public](#step-6-make-it-public) ## Links From 6813d3954165292ebbb72bb81fc8e618c0774db3 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:21:07 +0300 Subject: [PATCH 20/24] delete root link --- docs/guidelines/plugin.md | 45 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/guidelines/plugin.md b/docs/guidelines/plugin.md index 167797f1e..1660a02cd 100644 --- a/docs/guidelines/plugin.md +++ b/docs/guidelines/plugin.md @@ -11,29 +11,28 @@ See also [ClojureWerkz’s recommendations] for open source projects. **Table of Contents** -* [PostCSS Plugin Guidelines](#postcss-plugin-guidelines) - * [API](#1-api) - * [1.1 Clear name with `postcss-` prefix](#11-clear-name-with-postcss--prefix) - * [1.2. Do one thing, and do it well](#12-do-one-thing-and-do-it-well) - * [1.3. Do not use mixins](#13-do-not-use-mixins) - * [1.4. Keep `postcss` to `peerDependencies`](#14-keep-postcss-to-peerdependencies) - * [1.5. Set `plugin.postcssPlugin` with plugin name](#15-set-pluginpostcssplugin-with-plugin-name) - * [Processing](#2-processing) - * [2.1. Plugin must be tested](#21-plugin-must-be-tested) - * [2.2. Use asynchronous methods whenever possible](#22-use-asynchronous-methods-whenever-possible) - * [2.3. Use fast node’s scanning](#23-use-fast-nodes-scanning) - * [2.4. Set `node.source` for new nodes](#24-set-nodesource-for-new-nodes) - * [2.5. Use only the public PostCSS API](#25-use-only-the-public-postcss-api) - * [Dependencies](#3-dependencies) - * [3.1. Use messages to specify dependencies](#31-use-messages-to-specify-dependencies) - * [Errors](#4-errors) - * [4.1. Use `node.error` on CSS relevant errors](#41-use-nodeerror-on-css-relevant-errors) - * [4.2. Use `result.warn` for warnings](#42-use-resultwarn-for-warnings) - * [Documentation](#5-documentation) - * [5.1. Document your plugin in English](#51-document-your-plugin-in-english) - * [5.2. Include input and output examples](#52-include-input-and-output-examples) - * [5.3. Maintain a changelog](#53-maintain-a-changelog) - * [5.4. Include `postcss-plugin` keyword in `package.json`](#54-include-postcss-plugin-keyword-in-packagejson) +* [API](#1-api) + * [1.1 Clear name with `postcss-` prefix](#11-clear-name-with-postcss--prefix) + * [1.2. Do one thing, and do it well](#12-do-one-thing-and-do-it-well) + * [1.3. Do not use mixins](#13-do-not-use-mixins) + * [1.4. Keep `postcss` to `peerDependencies`](#14-keep-postcss-to-peerdependencies) + * [1.5. Set `plugin.postcssPlugin` with plugin name](#15-set-pluginpostcssplugin-with-plugin-name) +* [Processing](#2-processing) + * [2.1. Plugin must be tested](#21-plugin-must-be-tested) + * [2.2. Use asynchronous methods whenever possible](#22-use-asynchronous-methods-whenever-possible) + * [2.3. Use fast node’s scanning](#23-use-fast-nodes-scanning) + * [2.4. Set `node.source` for new nodes](#24-set-nodesource-for-new-nodes) + * [2.5. Use only the public PostCSS API](#25-use-only-the-public-postcss-api) +* [Dependencies](#3-dependencies) + * [3.1. Use messages to specify dependencies](#31-use-messages-to-specify-dependencies) +* [Errors](#4-errors) + * [4.1. Use `node.error` on CSS relevant errors](#41-use-nodeerror-on-css-relevant-errors) + * [4.2. Use `result.warn` for warnings](#42-use-resultwarn-for-warnings) +* [Documentation](#5-documentation) + * [5.1. Document your plugin in English](#51-document-your-plugin-in-english) + * [5.2. Include input and output examples](#52-include-input-and-output-examples) + * [5.3. Maintain a changelog](#53-maintain-a-changelog) + * [5.4. Include `postcss-plugin` keyword in `package.json`](#54-include-postcss-plugin-keyword-in-packagejson) ## 1. API From 8366cd5badf858c32a256c4a0bf10268d2fa1023 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:22:34 +0300 Subject: [PATCH 21/24] delete root link --- docs/guidelines/runner.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/guidelines/runner.md b/docs/guidelines/runner.md index 624a10823..a7cbbd00c 100644 --- a/docs/guidelines/runner.md +++ b/docs/guidelines/runner.md @@ -16,23 +16,22 @@ See also [ClojureWerkz’s recommendations] for open source projects. **Table of Contents** -* [PostCSS Runner Guidelines](#postcss-runner-guidelines) - * [API](#1-api) - * [1.1. Accept functions in plugin parameters](#11-accept-functions-in-plugin-parameters) - * [Processing](#21-set-from-and-to-processing-options) - * [2.1. Set `from` and `to` processing options](#21-set-from-and-to-processing-options) - * [2.2. Use only the asynchronous API](#22-use-only-the-asynchronous-api) - * [2.3. Use only the public PostCSS API](#23-use-only-the-public-postcss-api) - * [3.1. Rebuild when dependencies change](#31-rebuild-when-dependencies-change) - * [Output](#4-output) - * [4.1. Don’t show JS stack for `CssSyntaxError`](#41-dont-show-js-stack-for-csssyntaxerror) - * [4.2. Display `result.warnings()`](#42-display-resultwarnings) - * [4.3. Allow the user to write source maps to different files](#43-allow-the-user-to-write-source-maps-to-different-files) - * [Documentation](#5-output) - * [5.1. Document your runner in English](#51-document-your-runner-in-english) - * [5.2. Maintain a changelog](#52-maintain-a-changelog) - * [5.3. `postcss-runner` keyword in `package.json`](#53-postcss-runner-keyword-in-packagejson) - * [5.4. Keep postcss to peerDependencies](#54-keep-postcss-to-peerdependencies) +* [API](#1-api) + * [1.1. Accept functions in plugin parameters](#11-accept-functions-in-plugin-parameters) +* [Processing](#21-set-from-and-to-processing-options) + * [2.1. Set `from` and `to` processing options](#21-set-from-and-to-processing-options) + * [2.2. Use only the asynchronous API](#22-use-only-the-asynchronous-api) + * [2.3. Use only the public PostCSS API](#23-use-only-the-public-postcss-api) + * [3.1. Rebuild when dependencies change](#31-rebuild-when-dependencies-change) +* [Output](#4-output) + * [4.1. Don’t show JS stack for `CssSyntaxError`](#41-dont-show-js-stack-for-csssyntaxerror) + * [4.2. Display `result.warnings()`](#42-display-resultwarnings) + * [4.3. Allow the user to write source maps to different files](#43-allow-the-user-to-write-source-maps-to-different-files) +* [Documentation](#5-output) + * [5.1. Document your runner in English](#51-document-your-runner-in-english) + * [5.2. Maintain a changelog](#52-maintain-a-changelog) + * [5.3. `postcss-runner` keyword in `package.json`](#53-postcss-runner-keyword-in-packagejson) + * [5.4. Keep postcss to peerDependencies](#54-keep-postcss-to-peerdependencies) ## 1. API From 5b168240b029da35af1b732104a1a1dd131f2572 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:24:50 +0300 Subject: [PATCH 22/24] Update docs/index.md Co-authored-by: Andrey Sitnik --- docs/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 08a97f260..1027c061e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,5 @@ -**Index** +# Documentation + * [PostCSS Architecture](https://github.com/postcss/postcss/blob/main/docs/architecture.md#postcss-architecture) * [Overview](https://github.com/postcss/postcss/blob/main/docs/architecture.md#overview) * [Workflow](https://github.com/postcss/postcss/blob/main/docs/architecture.md#workflow) From a1abfa88e15a87874a27f2e4560c550993ffa489 Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:28:07 +0300 Subject: [PATCH 23/24] move table of contents --- docs/writing-a-plugin.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/writing-a-plugin.md b/docs/writing-a-plugin.md index c30d05d23..4f5b3ff84 100644 --- a/docs/writing-a-plugin.md +++ b/docs/writing-a-plugin.md @@ -1,5 +1,5 @@ -# Writing a PostCSS Plugin +**Table of Contents** * [Links](#links) * [Step 1: Create an idea](#step-1-create-an-idea) * [Step 2: Create a project](#step-2-create-a-project) @@ -8,6 +8,8 @@ * [Step 5: Fight with frustration](#step-5-fight-with-frustration) * [Step 6: Make it public](#step-6-make-it-public) +# Writing a PostCSS Plugin + ## Links Documentation: From 967d584cf5d7979e578e414eca9aeb67ed6abf4b Mon Sep 17 00:00:00 2001 From: muddv Date: Wed, 28 Sep 2022 21:29:58 +0300 Subject: [PATCH 24/24] Update docs/writing-a-plugin.md Co-authored-by: Andrey Sitnik --- docs/writing-a-plugin.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/writing-a-plugin.md b/docs/writing-a-plugin.md index 4f5b3ff84..8e5c9fb24 100644 --- a/docs/writing-a-plugin.md +++ b/docs/writing-a-plugin.md @@ -1,5 +1,6 @@ **Table of Contents** + * [Links](#links) * [Step 1: Create an idea](#step-1-create-an-idea) * [Step 2: Create a project](#step-2-create-a-project)