Skip to content
This repository was archived by the owner on Jan 5, 2021. It is now read-only.

Commit 9de1590

Browse files
committed
updating playgound to recent (v1.7) Tailwind versions. Upgrading dependencies, README, removing PurgeCSS which is now built-in, and configured from the config file
1 parent 8f1b18d commit 9de1590

File tree

4 files changed

+32
-39
lines changed

4 files changed

+32
-39
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@ To get started:
66

77
1. Clone the repository:
88

9-
```bash
10-
git clone https://github.com/tailwindcss/playground.git tailwindcss-playground
9+
```bash
10+
git clone https://github.com/tailwindcss/playground.git tailwindcss-playground
1111

12-
cd tailwindcss-playground
13-
```
12+
cd tailwindcss-playground
13+
```
1414

1515
2. Install the dependencies:
1616

17-
```bash
18-
# Using npm
19-
npm install
17+
```bash
18+
# Using npm
19+
npm install
2020

21-
# Using Yarn
22-
yarn
23-
```
21+
# Using Yarn
22+
yarn
23+
```
2424

2525
3. Start the development server:
2626

27-
```bash
28-
# Using npm
29-
npm run serve
27+
```bash
28+
# Using npm
29+
npm run serve
3030

31-
# Using Yarn
32-
yarn run serve
33-
```
31+
# Using Yarn
32+
yarn run serve
33+
```
3434

35-
Now you should be able to see the project running at localhost:8080.
35+
Now you should be able to see the project running at localhost:8080.
3636

3737
4. Open `public/index.html` in your editor and start experimenting!
3838

3939
## Building for production
4040

41-
Even though this isn't necessarily a starter kit for a proper project, we've included an example of setting up both [Purgecss](https://www.purgecss.com/) and [cssnano](https://cssnano.co/) to optimize your CSS for production.
41+
Even though this isn't necessarily a starter kit for a proper project, we've included an example of setting up [cssnano](https://cssnano.co/) to optimize your CSS for production.
4242

4343
To build an optimized version of your CSS, simply run:
4444

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
"start": "npm run serve"
77
},
88
"dependencies": {
9-
"autoprefixer": "^9.5.1",
10-
"tailwindcss": "^1.0"
9+
"autoprefixer": "^9.8.6",
10+
"tailwindcss": "^1.7.2"
1111
},
1212
"devDependencies": {
13-
"@fullhuman/postcss-purgecss": "^1.2.0",
14-
"concurrently": "^4.1.0",
15-
"cross-env": "^5.2.0",
13+
"concurrently": "^5.3.0",
14+
"cross-env": "^7.0.2",
1615
"cssnano": "^4.1.10",
1716
"live-server": "^1.2.1",
18-
"postcss-cli": "^6.1.2"
17+
"postcss-cli": "^7.1.1"
1918
}
2019
}

postcss.config.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
const purgecss = require('@fullhuman/postcss-purgecss')({
2-
content: ['./public/**/*.html'],
3-
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
4-
})
5-
61
module.exports = {
72
plugins: [
8-
require('tailwindcss'),
9-
require('autoprefixer'),
10-
...process.env.NODE_ENV === 'production'
11-
? [purgecss, require('cssnano')]
12-
: []
13-
]
14-
}
3+
require("tailwindcss"),
4+
require("autoprefixer"),
5+
...(process.env.NODE_ENV === "production" ? [require("cssnano")] : []),
6+
],
7+
};

tailwind.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
2+
purge: ["./public/**/*.html"],
23
theme: {
34
extend: {},
5+
variants: {},
6+
plugins: [],
47
},
5-
variants: {},
6-
plugins: [],
7-
}
8+
};

0 commit comments

Comments
 (0)