Skip to content

Commit f912011

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

File tree

12 files changed

+68
-27
lines changed

12 files changed

+68
-27
lines changed

.changeset/olive-toes-change.md

Lines changed: 7 additions & 0 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/themes/package.json

Lines changed: 21 additions & 4 deletions
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"
Lines changed: 1 addition & 1 deletion
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";
Lines changed: 2 additions & 0 deletions
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 renamed to packages/themes/src/gitcoin/tailwind.config.ts

Lines changed: 1 addition & 3 deletions
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;

packages/themes/tsconfig.json

Lines changed: 4 additions & 2 deletions
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

Lines changed: 11 additions & 0 deletions
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+
});

0 commit comments

Comments
 (0)