Company Theme NPM Package with modular plugins. #1502
Skylercrane23
started this conversation in
General
Replies: 1 comment
-
@Skylercrane23 what solution did you end up with? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@adamwathan
I am currently working on a company wide tailwind npm package for our brand. This includes base styles for colors, screens, spacing, etc. I am using
npm link
to test the package and is currently working with anytheme
orextended
object related imports.The issue I am having is with imported plugins. I have seen references to a
handler
function and a new api for plugins here #1268. But haven't seen a lot of documentation on how to implement it, especially with imported functions. Not sure if its possible for an NPM package export plugins as one plugin with tailwind but any info would be awesome.This is my setup:
I have also seen in that same PR linked at the top a way to create plugins like this:
Here is an example of how I am exporting a plugin that is then imported into this
index.js
.Any direction or help would be greatly appreciated. I currently have it working with something similar but I am having to import every single export from this file and place in the tailwind config vs what I would like to do by just requiring this plugin in any project like this in my
tailwind.config.js
:Beta Was this translation helpful? Give feedback.
All reactions