A simple starter project for playing around with Tailwind CSS in a proper PostCSS environment.
Get started:
-
Clone the repository:
git clone https://github.com/evan70/tailwind-css-playground.git tailwind-css-playground cd tailwind-css-playground -
Install the dependencies:
# Using npm npm install # Using Yarn yarn
-
Start the development server:
# Using npm npm run serve # Using Yarn yarn serve
Now you should be able to see the project running at localhost:8080.
-
Open
public/index.htmlin your favourite editor and start experimenting!
Example of setting up cssnano to optimize your CSS for production.
To build an optimized version of your CSS, simply run:
# Using npm
npm run production
# Using Yarn
yarn productionThat's done, check out ./public/build/tailwind.css to see your optimized output.