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

Commit e89baa0

Browse files
committed
Update instructions
1 parent 852474a commit e89baa0

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ A repository of examples showing how to setup Tailwind in a variety of different
1010

1111
If you are experienced with any of these frameworks, we'd love a PR that includes a barebones example of the best way to set up Tailwind in that environment.
1212

13+
Please include instructions for the setup process as well, so it's easier for others to follow. [Here's an example](examples/vue-cli/README.md).
14+
1315
If we're missing you're favorite framework, don't hesitate to PR that either!
1416

1517
### JS Frameworks

examples/vue-cli/README.md

+43-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,60 @@
11
# vue-cli
22

3+
Setting up Tailwind with vue-cli is really simple, just install Tailwind:
4+
5+
```sh
6+
npm install tailwindcss
7+
```
8+
9+
Then add it to your PostCSS config (use a separate `postcss.config.js` file):
10+
11+
```js
12+
module.exports = {
13+
plugins: [
14+
require('tailwindcss'),
15+
require('autoprefixer'),
16+
]
17+
}
18+
```
19+
20+
Next, create a CSS file for your Tailwind styles. We've stored in it `src/assets/tailwind.css` for this example:
21+
22+
```css
23+
@tailwind base;
24+
@tailwind components;
25+
@tailwind utilities;
26+
```
27+
28+
Finally, import that CSS file at the bottom of your main `App.vue` component:
29+
30+
```html
31+
<template>
32+
<!-- ... --->
33+
</template>
34+
35+
<script>
36+
/* ... */
37+
</script>
38+
39+
<style src="./assets/tailwind.css">
40+
```
41+
342
## Project setup
443
```
5-
yarn install
44+
npm install
645
```
746
847
### Compiles and hot-reloads for development
948
```
10-
yarn run serve
49+
npm run serve
1150
```
1251
1352
### Compiles and minifies for production
1453
```
15-
yarn run build
54+
npm run build
1655
```
1756
1857
### Lints and fixes files
1958
```
20-
yarn run lint
59+
npm run lint
2160
```

0 commit comments

Comments
 (0)