Skip to content

Commit f912011

Browse files
authored
fix: theme not published (#1)
1 parent 2798741 commit f912011

12 files changed

+68
-27
lines changed

.changeset/olive-toes-change.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@gitcoin/config": patch
3+
"@gitcoin/themes": patch
4+
"@gitcoin/ui": patch
5+
---
6+
7+
fix: theme not published

packages/config/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"url": "https://github.com/gitcoinco/core",
77
"directory": "packages/config"
88
},
9-
"private": true,
109
"license": "AGPL-3.0",
1110
"scripts": {
1211
"lint": "eslint . --max-warnings 0",

packages/themes/colors/index.ts

-1
This file was deleted.

packages/themes/package.json

+21-4
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,38 @@
66
"url": "https://github.com/gitcoinco/core",
77
"directory": "packages/themes"
88
},
9-
"private": true,
109
"license": "AGPL-3.0",
10+
"main": "./dist/index.js",
11+
"module": "./dist/index.mjs",
12+
"types": "./dist/index.d.ts",
1113
"scripts": {
14+
"build": "tsup",
15+
"dev": "tsup --watch",
1216
"lint": "eslint . --max-warnings 0",
1317
"clean": "rm -rf .turbo node_modules dist"
1418
},
1519
"exports": {
16-
"./gitcoin-theme": "./tailwind.config.ts",
17-
"./gitcoin-colors": "./colors/colors.ts"
20+
".": {
21+
"types": "./dist/index.d.ts",
22+
"import": "./dist/index.mjs",
23+
"require": "./dist/index.js"
24+
},
25+
"./gitcoin": {
26+
"types": "./dist/index.d.ts",
27+
"import": "./dist/index.mjs",
28+
"require": "./dist/index.js"
29+
}
1830
},
31+
"files": [
32+
"dist"
33+
],
1934
"devDependencies": {
2035
"@gitcoin/config": "workspace:*",
2136
"tailwind-variants": "^0.2.1",
2237
"tailwindcss": "^3.4.14",
23-
"tailwindcss-animate": "^1.0.7"
38+
"tailwindcss-animate": "^1.0.7",
39+
"tsup": "^8.0.2",
40+
"typescript": "5.5.4"
2441
},
2542
"publishConfig": {
2643
"access": "public"

packages/themes/colors/colors.ts packages/themes/src/gitcoin/colors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Colors, ColorSet } from "./types";
1+
import { Colors, ColorSet } from "../types";
22

33
const black = "#000000";
44
const white = "#ffffff";

packages/themes/src/gitcoin/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./colors";
2+
export * from "./tailwind.config";

packages/themes/tailwind.config.ts packages/themes/src/gitcoin/tailwind.config.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import tailwindcssAnimate from "tailwindcss-animate";
33

44
import { colors } from "./colors";
55

6-
const config: Omit<Config, "content"> = {
6+
export const tailwindConfig: Omit<Config, "content"> = {
77
darkMode: ["class", "[data-mode='dark']"],
88
theme: {
99
colors,
@@ -74,5 +74,3 @@ const config: Omit<Config, "content"> = {
7474
},
7575
plugins: [tailwindcssAnimate],
7676
} satisfies Omit<Config, "content">;
77-
78-
export default config;
File renamed without changes.

packages/themes/tsconfig.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"extends": "@gitcoin/config/tsconfig-react.json",
33
"compilerOptions": {
4-
"outDir": "dist"
4+
"outDir": "dist",
5+
"resolveJsonModule": true,
6+
"esModuleInterop": true
57
},
6-
"include": ["tailwind.config.ts"],
8+
"include": ["src/**/*"],
79
"exclude": ["node_modules", "dist"]
810
}

packages/themes/tsup.config.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from "tsup";
2+
3+
export default defineConfig({
4+
entry: ["src/gitcoin/index.ts"],
5+
format: ["esm", "cjs"],
6+
dts: true,
7+
clean: true,
8+
external: ["tailwindcss"],
9+
treeshake: true,
10+
sourcemap: true,
11+
});

packages/ui/tailwind.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { withTV } from "tailwind-variants/transformer";
22
import type { Config } from "tailwindcss";
3-
import sharedConfig from "@gitcoin/themes/gitcoin-theme"
3+
import { tailwindConfig } from "@gitcoin/themes"
44

55

66
export default withTV<Pick<Config, "content" | "presets">>({
77
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
8-
presets: [sharedConfig],
8+
presets: [tailwindConfig],
99
}) satisfies Config;

pnpm-lock.yaml

+19-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)