Skip to content

Commit f41e0de

Browse files
committed
chore: update Readme
1 parent 8f09384 commit f41e0de

File tree

3 files changed

+93
-85
lines changed

3 files changed

+93
-85
lines changed

README.md

+50-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
# PurgeCSS
22

3-
![Travis (.org)](https://img.shields.io/travis/FullHuman/purgecss?label=Travis&style=for-the-badge)
4-
![CircleCI](https://img.shields.io/circleci/build/github/FullHuman/purgecss?label=Circleci&style=for-the-badge)
53
![David](https://img.shields.io/david/FullHuman/purgecss?style=for-the-badge)
64
![David](https://img.shields.io/david/dev/FullHuman/purgecss?style=for-the-badge)
75
![Dependabot](https://img.shields.io/badge/dependabot-enabled-%23024ea4?style=for-the-badge)
86
![npm](https://img.shields.io/npm/v/purgecss?style=for-the-badge)
97
![npm](https://img.shields.io/npm/dw/purgecss?style=for-the-badge)
108
![GitHub](https://img.shields.io/github/license/FullHuman/purgecss?style=for-the-badge)
11-
![Codacy grade](https://img.shields.io/codacy/grade/2f2f3fb0a5c541beab2018483e62a828?style=for-the-badge)
12-
![Codacy coverage](https://img.shields.io/codacy/coverage/2f2f3fb0a5c541beab2018483e62a828?style=for-the-badge)
139

1410
<p align="center">
1511
<img src="https://i.imgur.com/UEiUiJ0.png" height="200" width="200" alt="PurgeCSS logo"/>
@@ -21,9 +17,58 @@ When you are building a website, chances are that you are using a css framework
2117

2218
This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your css files. Then it matches the selectors used in your files with the one in your content files. It removes unused selectors from your css, resulting in smaller css files.
2319

20+
## Version 1
21+
22+
If you are looking for [PurgeCSS 1](https://github.com/FullHuman/purgecss/tree/v1), the documentation is [here](https://purgecss.com)
23+
2424
## Documentation
2525

26-
You can find the PurgeCSS documentation on [this website](https://purgecss.com).
26+
You can find the PurgeCSS documentation on [this website](https://purgecss.full-human.com).
27+
28+
### Table of Contents
29+
30+
#### PurgeCSS
31+
32+
- [Configuration](https://purgecss.full-human.com/configuration.html)
33+
- [Command Line Interface](https://purgecss.full-human.com/CLI.html)
34+
- [Programmatic API](https://purgecss.full-human.com/api.html)
35+
- [Whitelisting](https://purgecss.full-human.com/whitelisting.html)
36+
- [Extractors](https://purgecss.full-human.com/extractors.html)
37+
- [Comparison](https://purgecss.full-human.com/comparison.html)
38+
39+
#### Plugins
40+
41+
- [PostCSS](https://purgecss.full-human.com/plugins/postcss.html)
42+
- [Webpack](https://purgecss.full-human.com/plugins/webpack.html)
43+
- [Gulp](https://purgecss.full-human.com/plugins/gulp.html)
44+
- [Grunt](https://purgecss.full-human.com/plugins/grunt.html)
45+
- [Gatsby](https://purgecss.full-human.com/plugins/gatsby.html)
46+
47+
#### Guides
48+
49+
- [Vue.js](https://purgecss.full-human.com/guides/vue.html)
50+
- [Nuxt.js](https://purgecss.full-human.com/guides/nuxt.html)
51+
- [React.js](https://purgecss.full-human.com/guides/react.html)
52+
- [Next.js](https://purgecss.full-human.com/guides/next.html)
53+
- [Razzle](https://purgecss.full-human.com/guides/razzle.html)
54+
55+
## Getting Started
56+
57+
#### Installation
58+
59+
```
60+
npm i --save-dev purgecss
61+
```
62+
63+
## Usage
64+
65+
```js
66+
import PurgeCSS from 'purgecss'
67+
const purgeCSSResults = await new Purgecss().purge({
68+
content: ['**/*.html'],
69+
css: ['**/*.css']
70+
})
71+
```
2772

2873
## Packages
2974

packages/purgecss-from-pug/package.json

-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@
2626
"devDependencies": {
2727
"pug-lexer": "^4.1.0",
2828
"pug-parser": "^5.0.1"
29-
},
30-
"publishConfig": {
31-
"registry": "https://npm.pkg.github.com/"
3229
}
3330
}

packages/purgecss/README.md

+43-77
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,56 @@
11
# PurgeCSS
22

3-
[![Build Status](https://travis-ci.org/FullHuman/purgecss.svg?branch=master)](https://travis-ci.org/FullHuman/purgecss)
4-
[![CircleCi](https://circleci.com/gh/FullHuman/purgecss/tree/master.svg?style=shield)]()
5-
[![dependencies Status](https://david-dm.org/fullhuman/purgecss/status.svg)](https://david-dm.org/fullhuman/purgecss)
6-
[![devDependencies Status](https://david-dm.org/fullhuman/purgecss/dev-status.svg)](https://david-dm.org/fullhuman/purgecss?type=dev)
7-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2f2f3fb0a5c541beab2018483e62a828)](https://www.codacy.com/app/FullHuman/purgecss?utm_source=github.com&utm_medium=referral&utm_content=FullHuman/purgecss&utm_campaign=Badge_Grade)
8-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/2f2f3fb0a5c541beab2018483e62a828)](https://www.codacy.com/app/FullHuman/purgecss?utm_source=github.com&utm_medium=referral&utm_content=FullHuman/purgecss&utm_campaign=Badge_Coverage)
9-
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
10-
[![npm](https://img.shields.io/npm/v/purgecss.svg)](https://www.npmjs.com/package/purgecss)
11-
[![license](https://img.shields.io/github/license/fullhuman/purgecss.svg)]() [![Greenkeeper badge](https://badges.greenkeeper.io/FullHuman/purgecss.svg)](https://greenkeeper.io/)
3+
![David](https://img.shields.io/david/FullHuman/purgecss?style=for-the-badge)
4+
![David](https://img.shields.io/david/dev/FullHuman/purgecss?style=for-the-badge)
5+
![Dependabot](https://img.shields.io/badge/dependabot-enabled-%23024ea4?style=for-the-badge)
6+
![npm](https://img.shields.io/npm/v/purgecss?style=for-the-badge)
7+
![npm](https://img.shields.io/npm/dw/purgecss?style=for-the-badge)
8+
![GitHub](https://img.shields.io/github/license/FullHuman/purgecss?style=for-the-badge)
129

1310
<p align="center">
14-
<img src="./.assets/logo.png" height="200" width="200" alt="PurgeCSS logo"/>
11+
<img src="https://i.imgur.com/UEiUiJ0.png" height="200" width="200" alt="PurgeCSS logo"/>
1512
</p>
1613

1714
## What is PurgeCSS?
1815

19-
When you are building a website, chances are that you are using a css framework
20-
like Bootstrap, Materializecss, Foundation, etc... But you will only use a small
21-
set of the framework and a lot of unused css styles will be included.
16+
When you are building a website, chances are that you are using a css framework like Bootstrap, Materializecss, Foundation, etc... But you will only use a small set of the framework and a lot of unused css styles will be included.
2217

23-
This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your
24-
css files. Then it matches the selectors used in your files with the one in your
25-
content files. It removes unused selectors from your css, resulting in smaller
26-
css files.
18+
This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your css files. Then it matches the selectors used in your files with the one in your content files. It removes unused selectors from your css, resulting in smaller css files.
19+
20+
## Version 1
21+
22+
If you are looking for [PurgeCSS 1](https://github.com/FullHuman/purgecss/tree/v1), the documentation is [here](https://purgecss.com)
2723

2824
## Documentation
2925

30-
You can find the PurgeCSS documentation
31-
[on this website](https://www.purgecss.com).
32-
33-
* [Configuration](https://www.purgecss.com/configuration)
34-
* [CLI](https://www.purgecss.com/cli)
35-
* [Javascript API](https://www.purgecss.com/javascript-api)
36-
* [Webpack plugin](https://www.purgecss.com/with-webpack)
37-
* [Gulp plugin](https://www.purgecss.com/with-gulp)
38-
* [Grunt plugin](https://www.purgecss.com/with-grunt)
39-
* [Rollup plugin](https://www.purgecss.com/with-rollup)
40-
* [Whitelisting](https://www.purgecss.com/whitelisting)
41-
* [Extractors](https://www.purgecss.com/extractors)
42-
* [Comparison](https://www.purgecss.com/comparison)
43-
* Guides
44-
* [React](https://www.purgecss.com/guides/react)
45-
* [Vue](https://www.purgecss.com/guides/vue)
46-
* [Nuxt](https://www.purgecss.com/guides/nuxt)
47-
* [Wordpress](https://www.purgecss.com/guides/wordpress)
26+
You can find the PurgeCSS documentation on [this website](https://purgecss.full-human.com).
27+
28+
### Table of Contents
29+
30+
#### PurgeCSS
31+
32+
- [Configuration](https://purgecss.full-human.com/configuration.html)
33+
- [Command Line Interface](https://purgecss.full-human.com/CLI.html)
34+
- [Programmatic API](https://purgecss.full-human.com/api.html)
35+
- [Whitelisting](https://purgecss.full-human.com/whitelisting.html)
36+
- [Extractors](https://purgecss.full-human.com/extractors.html)
37+
- [Comparison](https://purgecss.full-human.com/comparison.html)
38+
39+
#### Plugins
40+
41+
- [PostCSS](https://purgecss.full-human.com/plugins/postcss.html)
42+
- [Webpack](https://purgecss.full-human.com/plugins/webpack.html)
43+
- [Gulp](https://purgecss.full-human.com/plugins/gulp.html)
44+
- [Grunt](https://purgecss.full-human.com/plugins/grunt.html)
45+
- [Gatsby](https://purgecss.full-human.com/plugins/gatsby.html)
46+
47+
#### Guides
48+
49+
- [Vue.js](https://purgecss.full-human.com/guides/vue.html)
50+
- [Nuxt.js](https://purgecss.full-human.com/guides/nuxt.html)
51+
- [React.js](https://purgecss.full-human.com/guides/react.html)
52+
- [Next.js](https://purgecss.full-human.com/guides/next.html)
53+
- [Razzle](https://purgecss.full-human.com/guides/razzle.html)
4854

4955
## Getting Started
5056

@@ -57,53 +63,13 @@ npm i --save-dev purgecss
5763
## Usage
5864

5965
```js
60-
import Purgecss from 'purgecss'
61-
const purgeCss = new Purgecss({
66+
import PurgeCSS from 'purgecss'
67+
const purgeCSSResults = await new Purgecss().purge({
6268
content: ['**/*.html'],
6369
css: ['**/*.css']
6470
})
65-
const result = purgeCss.purge()
66-
```
67-
68-
With a custom extractor:
69-
70-
```js
71-
import purgeCSS from 'purgecss'
72-
import purgeHtml from 'purgecss-from-html'
73-
const result = await purgeCSS({
74-
content: ['**/*.html'],
75-
css: ['**/*.css'],
76-
extractors: [
77-
{
78-
extractor: purgeHtml,
79-
extensions: ['html']
80-
}
81-
]
82-
})
8371
```
8472

85-
### Build Plugin
86-
87-
<div align="center">
88-
<a href="https://github.com/FullHuman/purgecss-webpack-plugin">
89-
<img width="200" heigth="200" src="https://webpack.js.org/assets/icon-square-big.svg">
90-
</a>
91-
<a href="https://github.com/FullHuman/gulp-purgecss">
92-
<img height="200" width="89" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
93-
</a>
94-
<a href="https://github.com/FullHuman/grunt-purgecss">
95-
<img height="200" width="200" src="https://gruntjs.com/img/grunt-logo-no-wordmark.svg">
96-
</a>
97-
<a href="https://github.com/FullHuman/rollup-plugin-purgecss">
98-
<img height="200" width="200" src="https://rollupjs.org/logo.svg"/>
99-
</a>
100-
</div>
101-
102-
* [Webpack](https://www.purgecss.com/with-webpack)
103-
* [Gulp](https://www.purgecss.com/with-gulp)
104-
* [Grunt](https://www.purgecss.com/with-grunt)
105-
* [Rollup](https://www.purgecss.com/with-rollup)
106-
10773
## Contributing
10874

10975
Please read [CONTRIBUTING.md](./../../CONTRIBUTING.md) for details on our code of

0 commit comments

Comments
 (0)