Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: csstools/postcss-plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 587a0ba6be5ac2df454b9f9e119ed7401ae0a052
Choose a base ref
...
head repository: csstools/postcss-plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a7ea1ce300803e3c342e7fbec0b36611353ec8aa
Choose a head ref

Commits on Nov 16, 2022

  1. Copy the full SHA
    4e59f6a View commit details
  2. Copy the full SHA
    1298880 View commit details

Commits on Nov 18, 2022

  1. update dependencies

    romainmenke committed Nov 18, 2022
    Copy the full SHA
    4343a1b View commit details
  2. more install instructions (#710)

    * next.js install instructions
    
    * fix
    
    * postcss-load-config
    
    * fix
    
    * some cleanup
    romainmenke authored Nov 18, 2022
    Copy the full SHA
    684fcad View commit details
  3. typescript 4.8 (#713)

    romainmenke authored Nov 18, 2022
    Copy the full SHA
    27ec87d View commit details

Commits on Nov 20, 2022

  1. update dependencies

    romainmenke committed Nov 20, 2022
    Copy the full SHA
    de9e62a View commit details

Commits on Nov 21, 2022

  1. Bump typescript from 4.8.4 to 4.9.3 in /e2e (#720)

    Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.8.4 to 4.9.3.
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](microsoft/TypeScript@v4.8.4...v4.9.3)
    
    ---
    updated-dependencies:
    - dependency-name: typescript
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 21, 2022
    Copy the full SHA
    9ba701e View commit details
  2. Bump webpack-cli from 4.10.0 to 5.0.0 in /e2e (#719)

    Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.10.0 to 5.0.0.
    - [Release notes](https://github.com/webpack/webpack-cli/releases)
    - [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.10.0...webpack-cli@5.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: webpack-cli
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
    dependabot[bot] and romainmenke authored Nov 21, 2022
    Copy the full SHA
    c2fe900 View commit details

Commits on Nov 22, 2022

  1. Bump engine.io from 6.2.0 to 6.2.1 in /sites/postcss-preset-env (#727)

    Bumps [engine.io](https://github.com/socketio/engine.io) from 6.2.0 to 6.2.1.
    - [Release notes](https://github.com/socketio/engine.io/releases)
    - [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
    - [Commits](socketio/engine.io@6.2.0...6.2.1)
    
    ---
    updated-dependencies:
    - dependency-name: engine.io
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 22, 2022
    Copy the full SHA
    c71c7ad View commit details

Commits on Nov 23, 2022

  1. Copy the full SHA
    2ac4a2b View commit details

Commits on Nov 25, 2022

  1. improve clean cmd

    romainmenke committed Nov 25, 2022
    Copy the full SHA
    47a8ada View commit details

Commits on Nov 26, 2022

  1. update dependencies

    romainmenke committed Nov 26, 2022
    Copy the full SHA
    7143099 View commit details

Commits on Nov 28, 2022

  1. Bump @rollup/plugin-typescript from 9.0.2 to 10.0.0 (#732)

    Bumps [@rollup/plugin-typescript](https://github.com/rollup/plugins/tree/HEAD/packages/typescript) from 9.0.2 to 10.0.0.
    - [Release notes](https://github.com/rollup/plugins/releases)
    - [Changelog](https://github.com/rollup/plugins/blob/master/packages/typescript/CHANGELOG.md)
    - [Commits](https://github.com/rollup/plugins/commits/typescript-v10.0.0/packages/typescript)
    
    ---
    updated-dependencies:
    - dependency-name: "@rollup/plugin-typescript"
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 28, 2022
    Copy the full SHA
    32ca312 View commit details
  2. Bump @rollup/plugin-commonjs from 23.0.2 to 23.0.3 (#733)

    Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 23.0.2 to 23.0.3.
    - [Release notes](https://github.com/rollup/plugins/releases)
    - [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
    - [Commits](https://github.com/rollup/plugins/commits/commonjs-v23.0.3/packages/commonjs)
    
    ---
    updated-dependencies:
    - dependency-name: "@rollup/plugin-commonjs"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
    dependabot[bot] and romainmenke authored Nov 28, 2022
    Copy the full SHA
    85b3cc0 View commit details
  3. Copy the full SHA
    74817d8 View commit details

Commits on Nov 29, 2022

  1. Copy the full SHA
    3d8231f View commit details

Commits on Nov 30, 2022

  1. Improve performance of control comments in postcss-custom-properties (

    #737)
    
    * Improve performance of control comments in postcss-custom-properties
    
    Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
    
    * fix
    
    Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
    romainmenke and marvinhagemeister authored Nov 30, 2022
    Copy the full SHA
    00e0779 View commit details

Commits on Dec 1, 2022

  1. Copy the full SHA
    9e79e66 View commit details
  2. Speed up and simplify CI by checking dist files into git (#731)

    * improve CI
    
    * fix
    
    * add version log
    
    * fix
    
    * fix
    
    * fix
    
    * fix
    
    * only build on ubuntu with base node version
    
    * logs
    
    * more logs
    
    * fix
    
    * fix
    
    * correctly handle file permissions for cli's
    
    * fix
    
    * fix
    
    * lint
    
    * clean before build
    
    * simplify
    
    * fix
    
    * fix
    
    * fix
    
    * fix
    
    * add .gitattributes
    
    * rebuild
    romainmenke authored Dec 1, 2022
    Copy the full SHA
    2947f0a View commit details

Commits on Dec 3, 2022

  1. fix

    romainmenke committed Dec 3, 2022
    Copy the full SHA
    9f1dd65 View commit details
  2. fix

    romainmenke committed Dec 3, 2022
    Copy the full SHA
    8115e61 View commit details

Commits on Dec 4, 2022

  1. update dependencies

    romainmenke committed Dec 4, 2022
    Copy the full SHA
    7011d35 View commit details

Commits on Dec 10, 2022

  1. Copy the full SHA
    27c26c1 View commit details
  2. Copy the full SHA
    5e62614 View commit details

Commits on Dec 11, 2022

  1. update dependencies

    romainmenke committed Dec 11, 2022
    Copy the full SHA
    2a879cf View commit details
  2. update postcss

    romainmenke committed Dec 11, 2022
    Copy the full SHA
    d82c231 View commit details

Commits on Dec 12, 2022

  1. Bump postcss from 8.4.19 to 8.4.20 in /e2e (#747)

    Bumps [postcss](https://github.com/postcss/postcss) from 8.4.19 to 8.4.20.
    - [Release notes](https://github.com/postcss/postcss/releases)
    - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
    - [Commits](postcss/postcss@8.4.19...8.4.20)
    
    ---
    updated-dependencies:
    - dependency-name: postcss
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 12, 2022
    Copy the full SHA
    1feb010 View commit details
  2. Bump webpack-cli from 5.0.0 to 5.0.1 in /e2e (#749)

    Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.0.0 to 5.0.1.
    - [Release notes](https://github.com/webpack/webpack-cli/releases)
    - [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.0.0...webpack-cli@5.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: webpack-cli
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 12, 2022
    Copy the full SHA
    ff00bc4 View commit details
  3. Bump typescript from 4.9.3 to 4.9.4 in /e2e (#748)

    Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.3 to 4.9.4.
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](microsoft/TypeScript@v4.9.3...v4.9.4)
    
    ---
    updated-dependencies:
    - dependency-name: typescript
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 12, 2022
    Copy the full SHA
    4f5169d View commit details
  4. update dependencies

    romainmenke committed Dec 12, 2022
    Copy the full SHA
    c737f8f View commit details
  5. update dependencies (#743)

    * update dependencies
    
    * update dependencies
    romainmenke authored Dec 12, 2022
    Copy the full SHA
    18d33db View commit details

Commits on Dec 13, 2022

  1. Copy the full SHA
    22a6c81 View commit details

Commits on Dec 18, 2022

  1. Copy the full SHA
    6565650 View commit details
  2. update dependencies

    romainmenke committed Dec 18, 2022
    Copy the full SHA
    2699c7f View commit details

Commits on Dec 23, 2022

  1. specificity : add support for ::slotted / :host / :host-context (

    …#754)
    
    * specificity : add support for slotted / host / host-context
    
    * more comments
    
    * Update packages/selector-specificity/src/index.ts
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    
    * Update packages/selector-specificity/src/index.ts
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    romainmenke and Antonio-Laguna authored Dec 23, 2022
    Copy the full SHA
    d7b85b6 View commit details

Commits on Dec 26, 2022

  1. Bump @typescript-eslint/eslint-plugin from 5.46.1 to 5.47.0 (#761)

    Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.46.1 to 5.47.0.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.47.0/packages/eslint-plugin)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 26, 2022
    Copy the full SHA
    bdb1e1c View commit details
  2. Bump @babel/core from 7.20.5 to 7.20.7 (#762)

    Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.5 to 7.20.7.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.20.7/packages/babel-core)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
    dependabot[bot] and romainmenke authored Dec 26, 2022
    Copy the full SHA
    ad05bf9 View commit details
  3. update dependencies

    romainmenke committed Dec 26, 2022
    Copy the full SHA
    410c7d1 View commit details

Commits on Jan 2, 2023

  1. Bump eslint from 8.30.0 to 8.31.0 (#765)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.30.0 to 8.31.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.30.0...v8.31.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 2, 2023
    Copy the full SHA
    394e7d8 View commit details
  2. Bump @typescript-eslint/eslint-plugin from 5.47.0 to 5.47.1 (#764)

    Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.47.0 to 5.47.1.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.47.1/packages/eslint-plugin)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 2, 2023
    Copy the full SHA
    33e94df View commit details

Commits on Jan 7, 2023

  1. Copy the full SHA
    4c94d52 View commit details
  2. update dependencies

    romainmenke committed Jan 7, 2023
    Copy the full SHA
    627bd12 View commit details
  3. rebuild

    romainmenke committed Jan 7, 2023
    Copy the full SHA
    7c1dd64 View commit details
  4. Copy the full SHA
    f8d0fe0 View commit details
  5. Copy the full SHA
    6640f68 View commit details

Commits on Jan 9, 2023

  1. Bump @rollup/plugin-typescript from 10.0.1 to 11.0.0 (#774)

    * Bump @rollup/plugin-typescript from 10.0.1 to 11.0.0
    
    Bumps [@rollup/plugin-typescript](https://github.com/rollup/plugins/tree/HEAD/packages/typescript) from 10.0.1 to 11.0.0.
    - [Release notes](https://github.com/rollup/plugins/releases)
    - [Changelog](https://github.com/rollup/plugins/blob/master/packages/typescript/CHANGELOG.md)
    - [Commits](https://github.com/rollup/plugins/commits/commonjs-v11.0.0/packages/typescript)
    
    ---
    updated-dependencies:
    - dependency-name: "@rollup/plugin-typescript"
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * update dependencies
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Romain Menke <romainmenke@gmail.com>
    dependabot[bot] and romainmenke authored Jan 9, 2023
    Copy the full SHA
    dd19802 View commit details

Commits on Jan 14, 2023

  1. Copy the full SHA
    21459ce View commit details

Commits on Jan 16, 2023

  1. Copy the full SHA
    fb9d0ce View commit details
  2. fix(postcss-cascade-layers): fix example of postcss-cascade-layers (#…

    …787)
    
    * fix(postcss-cascade-layers): fix example of `postcss-cascade-layers`
    
    * update source docs
    
    Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
    CGQAQ and romainmenke authored Jan 16, 2023
    Copy the full SHA
    402205a View commit details
  3. Bump eslint from 8.31.0 to 8.32.0 (#782)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.31.0 to 8.32.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.31.0...v8.32.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 16, 2023
    Copy the full SHA
    0cb0e9d View commit details
Showing 2,106 changed files with 92,582 additions and 21,696 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
* text=auto eol=lf

# 1. reduce noise when running "git diff" by not showing a full diff for "/dist" contents
# 2. make it easier to merge by doing a dumb union for everything in "/dist"
**/dist/** -diff
**/dist/** merge=union
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/css-issue.yml
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ body:
- PostCSS Color Function
- PostCSS Color Functional Notation
- PostCSS Color Hex Alpha
- PostCSS Color Mod Function
- PostCSS Conditional Values
- PostCSS Custom Media Queries
- PostCSS Custom Properties
- PostCSS Custom Selectors
@@ -87,6 +87,10 @@ body:
- PostCSS Is Pseudo Class
- PostCSS Lab Function
- PostCSS Logical
- PostCSS Logical Float and Clear
- PostCSS Logical Resize
- PostCSS Logical Viewport Units
- PostCSS Media Queries Aspect-Ratio Number Values
- PostCSS Media Query Ranges
- PostCSS Nested Calc
- PostCSS Nesting
@@ -103,7 +107,7 @@ body:
- PostCSS Stepped Value Functions
- PostCSS System Ui Font Family
- PostCSS Text Decoration Shorthand
- PostCSS Trigonometric-Functions
- PostCSS Trigonometric Functions
- PostCSS Unset Value
- type: input
id: version
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/plugin-issue.yml
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ body:
- PostCSS Color Function
- PostCSS Color Functional Notation
- PostCSS Color Hex Alpha
- PostCSS Color Mod Function
- PostCSS Conditional Values
- PostCSS Custom Media Queries
- PostCSS Custom Properties
- PostCSS Custom Selectors
@@ -89,6 +89,10 @@ body:
- PostCSS Is Pseudo Class
- PostCSS Lab Function
- PostCSS Logical
- PostCSS Logical Float and Clear
- PostCSS Logical Resize
- PostCSS Logical Viewport Units
- PostCSS Media Queries Aspect-Ratio Number Values
- PostCSS Media Query Ranges
- PostCSS Nested Calc
- PostCSS Nesting
@@ -105,7 +109,7 @@ body:
- PostCSS Stepped Value Functions
- PostCSS System Ui Font Family
- PostCSS Text Decoration Shorthand
- PostCSS Trigonometric-Functions
- PostCSS Trigonometric Functions
- PostCSS Unset Value
- type: input
id: version
2 changes: 2 additions & 0 deletions .github/bin/clean.sh
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

set -e

find . -type d -name 'dist' | xargs rm -r

git clean -dfx --exclude \
.idea \
.vscode \
9 changes: 7 additions & 2 deletions .github/bin/format-package-json.mjs
Original file line number Diff line number Diff line change
@@ -64,7 +64,9 @@ const formatted = {};
formatted.private = packageJSONInfo.private;
delete packageJSONInfo.private;

formatted.engines = packageJSONInfo.engines;
formatted.engines = {
node: '^14 || ^16 || >=18'
};
delete packageJSONInfo.engines;

formatted.type = packageJSONInfo.type;
@@ -206,7 +208,10 @@ const formatted = {};
delete packageJSONInfo.keywords;

if (formatted.keywords && formatted.keywords.length) {
formatted.keywords.sort();
const keywords = new Set(formatted.keywords);
keywords.forEach((keyword) => keywords.delete(keyword + 's')); // poor mans pluralize, we only want singular words as keywords
formatted.keywords = Array.from(keywords);
formatted.keywords.sort((a, b) => a.localeCompare(b));
}

if (Object.keys(packageJSONInfo.csstools ?? {}).length) {
91 changes: 75 additions & 16 deletions .github/bin/generate-docs/install-template.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,15 @@

[<humanReadableName>] runs in all Node environments, with special instructions for:

| [Node](#node) | [PostCSS CLI](#postcss-cli) | [Webpack](#webpack) | [Create React App](#create-react-app) | [Gulp](#gulp) | [Grunt](#grunt) |
| --- | --- | --- | --- | --- | --- |
- [Node](#node)
- [PostCSS CLI](#postcss-cli)
- [PostCSS Load Config](#postcss-load-config)
- [Webpack](#webpack)
- [Next.js](#nextjs)
- [Gulp](#gulp)
- [Grunt](#grunt)

<parallelBuildsNotice>

## Node

@@ -16,6 +23,7 @@ npm install postcss <packageName> --save-dev
Use it as a [PostCSS] plugin:

```js
// commonjs
const postcss = require('postcss');
const <exportName> = require('<packageName>');

@@ -24,6 +32,16 @@ postcss([
]).process(YOUR_CSS /*, processOptions */);
```

```js
// esm
import postcss from 'postcss';
import <exportName> from '<packageName>';

postcss([
<exportName>(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```

## PostCSS CLI

Add [PostCSS CLI] to your project:
@@ -44,6 +62,38 @@ module.exports = {
}
```

## PostCSS Load Config

If your framework/CLI supports [`postcss-load-config`](https://github.com/postcss/postcss-load-config).

```bash
npm install <packageName> --save-dev
```

`package.json`:

```json
{
"postcss": {
"plugins": {
"<packageName>": {}
}
}
}
```

`.postcssrc.json`:

```json
{
"plugins": {
"<packageName>": {}
}
}
```

_See the [README of `postcss-load-config`](https://github.com/postcss/postcss-load-config#usage) for more usage options._

## Webpack

_Webpack version 5_
@@ -73,6 +123,7 @@ module.exports = {
options: {
postcssOptions: {
plugins: [
<otherPluginsInWebpack>,
[
"<packageName>",
{
@@ -90,26 +141,35 @@ module.exports = {
};
```

## Create React App
## Next.js

Add [React App Rewired] and [React App Rewire PostCSS] to your project:
Read the instructions on how to [customize the PostCSS configuration in Next.js](https://nextjs.org/docs/advanced-features/customizing-postcss-config)

```bash
npm install react-app-rewired react-app-rewire-postcss <packageName> --save-dev
npm install <packageName> --save-dev
```

Use [React App Rewire PostCSS] and [<humanReadableName>] in your
`config-overrides.js` file:
Use [<humanReadableName>] in your `postcss.config.json` file:

```js
const reactAppRewirePostcss = require('react-app-rewire-postcss');
const <exportName> = require('<packageName>');
```json
{
"plugins": [
"<packageName>"
]
}
```

module.exports = config => reactAppRewirePostcss(config, {
plugins: () => [
<exportName>(/* pluginOptions */)
```json5
{
"plugins": [
[
"<packageName>",
{
// Optionally add plugin options
}
]
]
});
}
```

## Gulp
@@ -172,5 +232,4 @@ grunt.initConfig({
[PostCSS CLI]: https://github.com/postcss/postcss-cli
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[<humanReadableName>]: https://github.com/csstools/postcss-plugins/tree/main/<packagePath>
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
[React App Rewired]: https://github.com/timarney/react-app-rewired
[Next.js]: https://nextjs.org
10 changes: 10 additions & 0 deletions .github/bin/generate-docs/install.mjs
Original file line number Diff line number Diff line change
@@ -11,4 +11,14 @@ installDoc = installDoc.replaceAll('<humanReadableName>', packageJSONInfo.csstoo
installDoc = installDoc.replaceAll('<packageName>', packageJSONInfo.name);
installDoc = installDoc.replaceAll('<packagePath>', path.join(path.basename(path.dirname(process.cwd())), path.basename(process.cwd())));

if (packageJSONInfo?.csstools?.assumesToProcessBundledCSS) {
installDoc = installDoc.replaceAll('<parallelBuildsNotice>', `⚠️ [${packageJSONInfo.csstools.humanReadableName}] assumes to process your complete CSS bundle.<br>If your build tool processes files individually or in parallel the output will be incorrect.<br>Using [\`postcss-import\`](https://www.npmjs.com/package/postcss-import) and \`@import\` statements is one way to make sure your CSS is bundled before it is processed by this plugin.\n`);
installDoc = installDoc.replaceAll('<otherPluginsInWebpack>', `["postcss-import"]`);
// <parallelBuildsNotice>
} else {
// Just a filler so that formatting doesn't become too complex.
installDoc = installDoc.replaceAll('<parallelBuildsNotice>', ``);
installDoc = installDoc.replaceAll('<otherPluginsInWebpack>', `// Other plugins`);
}

await fsp.writeFile('./INSTALL.md', installDoc);
14 changes: 8 additions & 6 deletions .github/bin/generate-docs/readme.mjs
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ readmeDoc = readmeDoc.replace(`<!-- Available Variables: -->
readmeDoc = readmeDoc.replaceAll('<corsWarning>', corsTemplate);

// Insert "Header" section
readmeDoc = readmeDoc.replace('<header>', `# <humanReadableName> [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
readmeDoc = readmeDoc.replace('<header>', `# <humanReadableName> [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS]
` + '[<img alt="npm version" src="https://img.shields.io/npm/v/<packageName>.svg" height="20">][npm-url] ' +
`${
@@ -68,8 +68,13 @@ postcss([
readmeDoc = readmeDoc.replace('<envSupport>', `[<humanReadableName>] runs in all Node environments, with special
instructions for:
| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
| --- | --- | --- | --- | --- | --- |`);
- [Node](INSTALL.md#node)
- [PostCSS CLI](INSTALL.md#postcss-cli)
- [PostCSS Load Config](INSTALL.md#postcss-load-config)
- [Webpack](INSTALL.md#webpack)
- [Next.js](INSTALL.md#nextjs)
- [Gulp](INSTALL.md#gulp)
- [Grunt](INSTALL.md#grunt)`);

// Insert "Link List" section
readmeDoc = readmeDoc.replace('<linkList>', `[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
@@ -81,10 +86,7 @@ ${
[discord]: https://discord.gg/bUadyRwkJS
[npm-url]: https://www.npmjs.com/package/<packageName>
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[<humanReadableName>]: https://github.com/csstools/postcss-plugins/tree/main/<packagePath>`);

readmeDoc = readmeDoc.replaceAll('<cssdbId>', packageJSONInfo.csstools.cssdbId);
40 changes: 0 additions & 40 deletions .github/bin/modified-workspaces/exec.mjs

This file was deleted.

16 changes: 0 additions & 16 deletions .github/bin/modified-workspaces/last-cached-commit.mjs

This file was deleted.

Loading