Skip to content

Commit 2d87cc8

Browse files
committed
Merge branch 'master' of github.com:forsartis/vue-cli-plugin-tailwind
2 parents 938d33a + 6a78c76 commit 2d87cc8

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

README.md

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,27 @@
22
[![Tailwind CSS](https://img.shields.io/npm/dependency-version/vue-cli-plugin-tailwind/tailwindcss.svg)](https://tailwindcss.com/)
33
[![License](https://img.shields.io/npm/l/vue-cli-plugin-tailwind.svg)](https://github.com/forsartis/vue-cli-plugin-tailwind/blob/master/LICENSE)
44

5-
A plugin that adds Tailwind CSS and Purgecss to your vue-cli project.
5+
A plugin that adds Tailwind CSS to your vue-cli project.
66

77
## Getting started
88
Inside your vue-cli project folder add the plugin via:
99
```
1010
vue add tailwind
1111
```
1212
Choose what Tailwind config you want to generate:
13-
* **none** - Won't create a config file. Useful if you already have a config or you don't need to change Tailwinds default styles.
13+
* **none** - Won't create a config file. Useful if you already have a config (make sure to configure PurgeCSS).
1414
* **minimal** *(default)* - Will create a minimal `tailwind.config.js` file where you can define your customizations.
1515
* **full** - Will generate a `tailwind.config.js` file containing the entire default configuration.
1616

1717
See [Tailwinds configuration guide](https://tailwindcss.com/docs/configuration) for more info.
1818

1919
## PostCSS Configuration
20-
Tailwind CSS and Purgecss will be added as plugins in your PostCSS config.
20+
Tailwind CSS will be added as plugins in your PostCSS config.
2121
```javascript
2222
// postcss.config.js
2323
module.exports = {
2424
plugins: {
2525
tailwindcss: {},
26-
'vue-cli-plugin-tailwind/purgecss': {},
2726
autoprefixer: {},
2827
},
2928
};
@@ -39,29 +38,14 @@ module.exports = {
3938
},
4039
};
4140
```
42-
### Configure Purgecss
43-
By default Purgecss will look for css selectors in your `.html` files inside the `./public` directory and `.vue` files inside the `./src` directory.
41+
### Configure PurgeCSS
42+
By default PurgeCSS will look for css selectors in your `.html` files inside the `./public` directory and `.vue` files inside the `./src` directory.
4443
```javascript
45-
let config = {
46-
content: ['./public/**/*.html', './src/**/*.vue'],
47-
defaultExtractor: content =>
48-
content.match(/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g) || [],
49-
};
50-
```
51-
You can extend/override the default config in your PostCSS configuration.
52-
```javascript
53-
// postcss.config.js
54-
module.exports = {
55-
plugins: {
56-
tailwindcss: {},
57-
'vue-cli-plugin-tailwind/purgecss': {
58-
whitelist: ['foo', 'bar'],
59-
},
60-
autoprefixer: {},
61-
},
62-
};
44+
purge: {
45+
content: ['./public/**/*.html', './src/**/*.vue']
46+
},
6347
```
64-
Check [https://www.purgecss.com/configuration#options](https://www.purgecss.com/configuration#options) for a list of available options.
48+
Check [https://tailwindcss.com/docs/optimizing-for-production](https://tailwindcss.com/docs/optimizing-for-production) for more info.
6549

6650
## License
6751
[MIT](https://github.com/forsartis/vue-cli-plugin-tailwind/blob/master/LICENSE)

0 commit comments

Comments
 (0)