Skip to content

Commit

Permalink
docs: Point to new extractor package names (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldiekmeier committed Dec 3, 2022
1 parent 42a4ea5 commit 8d28e2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/extractors.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The default extractor considers every word of a file as a selector. The default

Using an extractor can be useful if you notice that PurgeCSS does not remove enough unused css or removes used ones.

Using a specific extractor for an extension should provide you with the best accuracy. If you want to purge exclusively html files you might want to consider the `purge-from-html` extractor.
Using a specific extractor for an extension should provide you with the best accuracy. If you want to purge exclusively html files you might want to consider the `purgecss-from-html` extractor.

You can use an extractor by settings the extractors option in the PurgeCSS config file.

Expand All @@ -65,7 +65,7 @@ export default options

## Creating an extractor

An extractor is a simple function that takes the content of a file as a string and returns an array of selectors. By convention, the name of the npm package is `purge-from-[typefile]` \(e.g. purge-from-pug\). Using this convention will allow users to look at the list of extractor on npm by searching `purge-from`.
An extractor is a simple function that takes the content of a file as a string and returns an array of selectors. By convention, the name of the npm package is `purgecss-from-[typefile]` \(e.g. purgecss-from-pug\). Using this convention will allow users to look at the list of extractor on npm by searching `purgecss-from`.

```js
const purgeFromJs = (content) => {
Expand Down

0 comments on commit 8d28e2a

Please sign in to comment.