Skip to content

Commit a3298a9

Browse files
committed
docs: updated some commands and improved a statement
Some old commands were not working; replaced them with the new ones. Reference: for fixing package installation, took the reference from tailwindlabs/tailwindcss#3432 (comment)
1 parent d243b65 commit a3298a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/how-to-guides/integrations/integrate-tailwindcss.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The code that we will cover in this guide can also be found in our GitHub [examp
2828
Install `tailwindcss` package and its peer-dependencies using yarn, by running the following command from root of your project:
2929

3030
```
31-
yarn add -D tailwindcss@npm:@tailwindcss/postcss7-compat^2.1.2 postcss@^7 autoprefixer@^9
31+
yarn add -D tailwindcss@npm:@tailwindcss/postcss7-compat@^2.1.2 postcss@^7 autoprefixer@^9
3232
```
3333
:::info
3434
Webiny currently uses [Webpack 4](https://v4.webpack.js.org/) which doesn't support PostCSS 8 yet. So, we'll need to install the [Tailwind CSS v2.0 PostCSS 7 compatibility](https://tailwindcss.com/docs/installation#post-css-7-compatibility-build) build for now as shown above.
@@ -163,7 +163,7 @@ Now that we have added Tailwind CSS to Webpack configuration, let's move on to t
163163
Next, generate your `tailwind.config.js` file. From the root of your project run the following command:
164164

165165
```
166-
tailwindcss init
166+
npx tailwindcss init
167167
```
168168

169169
:::note
@@ -191,7 +191,7 @@ module.exports = {
191191
Learn more about configuring Tailwind in the [configuration documentation](https://tailwindcss.com/docs/configuration).
192192
:::
193193

194-
Now that we have this global configuration, let's use it in the **Website** `(apps/website)` React application as shown below:
194+
Now that we have this global configuration, let's use it in the **Website** `(apps/website)` React application by creating a `tailwind.config.js` file in `apps/website/code` directory as shown below:
195195

196196
```js title="apps/website/code/tailwind.config.js"
197197
// Import config from the project root.
@@ -216,13 +216,13 @@ Tailwind CSS swaps these directives out at build-time with all of the styles it
216216
That's all! Now, when you start your **Website** `(apps/website)` React application locally, by running:
217217

218218
```
219-
yarn watch --env=local
219+
yarn webiny watch apps/website --env dev
220220
```
221221

222222
Or build it (which happens automatically for you when you deploy your application using `webiny deploy` command):
223223

224224
```
225-
yarn build --env=<YOUR_ENV>
225+
yarn webiny deploy apps/website --env {environment}
226226
```
227227
Tailwind CSS is ready to use in your Webiny project.
228228

0 commit comments

Comments
 (0)