GithubHelp home page GithubHelp logo

tailwindcss-automation's Introduction

tailwindcss-automation

An automation for installing TailwindCSS in a Bridgetown site.

In your Bridgetown project folder, run:

bin/bridgetown apply https://github.com/bridgetownrb/tailwindcss-automation

(Note: it will overwrite any existing postcss.config.js file in your repo.)

You can also apply the automation when creating a new site:

bridgetown new mysite --apply=https://github.com/bridgetownrb/tailwindcss-automation

The automation will add Tailwind to your package.json, set up a default Tailwind config, add the import statements to your frontend CSS entrypoint, and add a builder which will detect when content in src is modified and trigger Tailwind's JIT compiler to run.

Any questions? Check out the Bridgetown community discussion channels for help.


Future Compatibility Message

The Tailwind automation used to be a configuration option bundled with Bridgetown, but it has since been extracted to this community-maintained repository. I (@jaredcwhite) do not use or endorse Tailwind, but I'm happy to accept PRs to keep the automation working in case a future version of Tailwind breaks the script in some way. Thanks!

tailwindcss-automation's People

Contributors

jaredcwhite avatar tommasongr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tailwindcss-automation's Issues

How do I use `@tailwindcss/typography`?

Hi. Tried to add it to package.json and postcss.config.js but class="prose" did nothing.

diff --git a/package.json b/package.json
index cd100f4..1ef612a 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
   },
   "dependencies": {
+    "@tailwindcss/typography": "^0.5.10",
   }
 }

and

diff --git a/postcss.config.js b/postcss.config.js
index bd5099c..617c814 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,10 +1,15 @@
 module.exports = {
   plugins: {
-    'tailwindcss': {},
+    "tailwindcss": {
+      plugins: [
+        require("@tailwindcss/typography"),
+        // ...
+      ],
+    },
   "postcss-flexbugs-fixes": {},
   "postcss-preset-env": {
       autoprefixer: {
       flexbox: 'no-2009'
       flexbox: "no-2009"
       },
       stage: 2
     }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.