Skip to content

Commit

Permalink
feat: tailwind plugin POC
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini committed Jan 10, 2024
1 parent ea76869 commit 417297f
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 406 deletions.
1 change: 0 additions & 1 deletion packages/documentation/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/** @type { import('@storybook/react').Preview } */

import "../src/index.css";
import "@versini/ui-components/dist/style.css";

const preview = {
parameters: {
Expand Down
12 changes: 4 additions & 8 deletions packages/documentation/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/** @type {import('tailwindcss').Config} */

export default {
content: ["./src/**/*.{js,ts,jsx,tsx}", ".storybook/**/*.{js,ts,jsx,tsx}"],
};

// import { twPlugin } from "@versini/ui-plugins";
import { twPlugin } from "@versini/ui-components/dist/utilities";

// export default twPlugin.merge({
// content: ["./src/**/*.{js,ts,jsx,tsx}", ".storybook/**/*.{js,ts,jsx,tsx}"],
// });
export default twPlugin.merge({
content: ["./src/**/*.{js,ts,jsx,tsx}", ".storybook/**/*.{js,ts,jsx,tsx}"],
});
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// import { customCSS, tokens } from "@versini/ui-components/dist/utilities";
import typography from "@tailwindcss/typography";
import { converter } from "culori";
import plugin from "tailwindcss/plugin";

import { customCSS } from "../../../../ui-components/lib/customCSS";
import { tokens } from "../../../../ui-components/lib/tokens";
import { customCSS } from "./customCSS";
import { tokens } from "./tokens";

const parse = converter("rgb");

Expand Down
88 changes: 0 additions & 88 deletions packages/ui-components/lib/twPlugin.js

This file was deleted.

9 changes: 9 additions & 0 deletions packages/ui-components/src/__tests__/utilities.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { customCSS, tokens, twPlugin } from "../utilities";

describe("utilities", () => {
it("should work", () => {
expect(tokens.colors).toBeDefined();
expect(customCSS).toBeDefined();
expect(twPlugin).toBeDefined();
});
});
3 changes: 2 additions & 1 deletion packages/ui-components/src/utilities.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { customCSS } from "../lib/customCSS";
import { twPlugin } from "../lib/tailwindPlugin";
import { tokens } from "../lib/tokens";

export { customCSS, tokens };
export { customCSS, tokens, twPlugin };
2 changes: 1 addition & 1 deletion packages/ui-components/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */

import { twPlugin } from "@versini/ui-plugins";
import { twPlugin } from "./lib/tailwindPlugin";

export default twPlugin.merge({
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
Expand Down
28 changes: 0 additions & 28 deletions packages/ui-plugins/.eslintrc.cjs

This file was deleted.

27 changes: 0 additions & 27 deletions packages/ui-plugins/README.md

This file was deleted.

51 changes: 0 additions & 51 deletions packages/ui-plugins/package.json

This file was deleted.

2 changes: 0 additions & 2 deletions packages/ui-plugins/src/plugins/index.ts

This file was deleted.

37 changes: 0 additions & 37 deletions packages/ui-plugins/src/plugins/tailwind/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions packages/ui-plugins/tsconfig.json

This file was deleted.

10 changes: 0 additions & 10 deletions packages/ui-plugins/tsconfig.node.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages/ui-plugins/tsup.config.ts

This file was deleted.

Loading

0 comments on commit 417297f

Please sign in to comment.