Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

documentation on usage? #6

Open
yangkennyk opened this issue Mar 26, 2020 · 2 comments
Open

documentation on usage? #6

yangkennyk opened this issue Mar 26, 2020 · 2 comments
Labels
good first issue Good for newcomers

Comments

@yangkennyk
Copy link

Hello!

I'm new to tailwind and have been trying to get this plugin to work.

I'm not sure what else to do after including the plugin through my tailwind.config.js

plugins: [ require("tailwind-gutenberg") ]

@anugupta
Copy link

anugupta commented May 2, 2020

Same here.
If anyone's managed to work out what to do, could they comment here. I'll be more than happy to make a PR to add some steps to the readme, but I really don't quite get how this is meant to work or what we need to do.

@tomphilpotts
Copy link

Hey,

I got this working on my install.

There is probably a way to do this with npm install, but I was just testing it at the moment.

Here goes:

Step 1:

Create a new folder call 'tailwind-plugin', in the same directory as your tailwind.config.js.

Step 2:

Move the 'src' folder and 'index.js' into the 'tailwind-plugin' folder.

Folder structure should look like this:
.....

tailwind-plugins

src
index.js
..

Step 3:

Then in your tailwind.config.js

plugins: [
    ....
    require('./tailwind-plugins/index'),
   ...
],

Step 4:

You need to add, to the main package.json

"devDependencies": {
"chroma-js": "2.0.3",
},
"dependencies": {
"lodash": "^4.17.20"
}

That is it, tailwind will then require the index.js file that will load all of the src/files.

This is a bit hacky and I am sure there is a better way to install it. But for me it works fine for now.

One note, if you do PurgeCss none of the style for Gutenberg will be included. You will need to whitelist them individually.

Hope this helps anyone in the future.

@kellymears kellymears added the good first issue Good for newcomers label Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants