Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ffloriel committed Mar 14, 2021
2 parents ef2f5f7 + 9b0fdc3 commit 50c8d71
Show file tree
Hide file tree
Showing 11 changed files with 1,439 additions and 996 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your

## Sponsors 🥰

[<img src="https://avatars0.githubusercontent.com/u/67109815?v=4" height="85">](https://tailwindcss.com)
[<img src="https://avatars0.githubusercontent.com/u/67109815?v=4" height="85" style="margin-right: 10px">](https://tailwindcss.com)
[<img src="https://avatars.githubusercontent.com/u/6852555?&v=4" height="85">](https://vertistudio.com/)

## Documentation

Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: PurgeCSS - Remove unused CSS
lang: en-US
meta:
- name: description
content: PurgeCSS is a tool to remove unused CSS that you're not using in your project. It can be used as part of your development workflow. PurgeCSS comes with a JavaScript API, a CLI, and plugins for popular build tools.
content: PurgeCSS is a tool to remove unused CSS from your project. It can be used as part of your development workflow. PurgeCSS comes with a JavaScript API, a CLI, and plugins for popular build tools.
- itemprop: description
content: PurgeCSS is a tool to remove unused CSS that you're not using in your project. It can be used as part of your development workflow. PurgeCSS comes with a JavaScript API, a CLI, and plugins for popular build tools.
content: PurgeCSS is a tool to remove unused CSS from your project. It can be used as part of your development workflow. PurgeCSS comes with a JavaScript API, a CLI, and plugins for popular build tools.
- property: og:url
content: https://purgecss.com
- property: og:site_name
Expand All @@ -19,7 +19,7 @@ meta:
- property: og:title
content: Remove unused CSS - PurgeCSS
- property: og:description
content: PurgeCSS is a tool to remove unused CSS that you're not using in your project. It can be used as part of your development workflow. PurgeCSS comes with a JavaScript API, a CLI, and plugins for popular build tools.
content: PurgeCSS is a tool to remove unused CSS from your project. It can be used as part of your development workflow. PurgeCSS comes with a JavaScript API, a CLI, and plugins for popular build tools.


---
Expand All @@ -37,8 +37,8 @@ This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your

## Sponsors 🥰

[<img src="https://avatars0.githubusercontent.com/u/67109815?v=4" height="85">](https://tailwindcss.com)

[<img src="https://avatars0.githubusercontent.com/u/67109815?v=4" height="85" style="margin-right: 10px">](https://tailwindcss.com)
[<img src="https://avatars.githubusercontent.com/u/6852555?&v=4" height="85">](https://vertistudio.com/)

## Table of Contents

Expand Down
6 changes: 3 additions & 3 deletions docs/plugins/gulp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Gulp | PurgeCSS
lang: en-US
meta:
- name: description
content: PurgeCSS is a tool to remove unused CSS that you're not using in your project. You can use it with gulp plugin.
content: PurgeCSS is a tool to remove unused CSS from your project. You can use it with gulp plugin.
- itemprop: description
content: PurgeCSS is a tool to remove unused CSS that you're not using in your project. You can use it with gulp plugin.
content: PurgeCSS is a tool to remove unused CSS from your project. You can use it with gulp plugin.
- property: og:url
content: https://purgecss.com/plugins/gulp
- property: og:site_name
Expand All @@ -19,7 +19,7 @@ meta:
- property: og:title
content: Remove unused CSS - PurgeCSS
- property: og:description
content: PurgeCSS is a tool to remove unused CSS that you're not using in your project. You can use it with gulp plugin.
content: PurgeCSS is a tool to remove unused CSS from your project. You can use it with gulp plugin.
---

# Gulp
Expand Down
2,222 changes: 1,345 additions & 877 deletions package-lock.json

Large diffs are not rendered by default.

115 changes: 38 additions & 77 deletions packages/purgecss-webpack-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/purgecss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your

## Sponsors 🥰

[<img src="https://avatars0.githubusercontent.com/u/67109815?v=4" height="85">](https://tailwindcss.com)
[<img src="https://avatars0.githubusercontent.com/u/67109815?v=4" height="85" style="margin-right: 10px">](https://tailwindcss.com)
[<img src="https://avatars.githubusercontent.com/u/6852555?&v=4" height="85">](https://vertistudio.com/)

## Documentation

Expand Down
6 changes: 5 additions & 1 deletion packages/purgecss/__tests__/attributes.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import PurgeCSS from "./../src/index";

import { ROOT_TEST_EXAMPLES } from "./utils";

describe("attributes", () => {
Expand All @@ -9,6 +8,7 @@ describe("attributes", () => {
const resultsPurge = await new PurgeCSS().purge({
content: [`${ROOT_TEST_EXAMPLES}attributes/attribute_selector.html`],
css: [`${ROOT_TEST_EXAMPLES}attributes/attribute_selector.css`],
dynamicAttributes: ["aria-selected"],
});
purgedCSS = resultsPurge[0].css;
});
Expand Down Expand Up @@ -72,4 +72,8 @@ describe("attributes", () => {
expect(purgedCSS.includes('[class*=" class2"]')).toBe(true);
expect(purgedCSS.includes('[class*="class1 class2 "]')).toBe(true);
});

it("keeps dynamic attributes", () => {
expect(purgedCSS.includes("[aria-selected]")).toBe(true);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,8 @@ a[title*="fat"] {
}
[class*="class1 class2 "] {
color: blue;
}
}

[aria-selected] {
font-weight: 700;
}

0 comments on commit 50c8d71

Please sign in to comment.