Skip to content

Commit d36ced1

Browse files
authored
Polish generated code (#15)
* Clean up library exports and expose types * Upgrade version
1 parent 18c1a2b commit d36ced1

File tree

5 files changed

+594
-16
lines changed

5 files changed

+594
-16
lines changed

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{
22
"name": "snap-components",
3-
"version": "0.0.6",
4-
"type": "module",
3+
"version": "0.0.7",
54
"author": "Eduardo Aparicio Cardenes",
5+
"type": "module",
66
"files": [
7-
"dist/*"
7+
"dist"
88
],
9+
"main": "./dist/snap-components.cjs.js",
10+
"module": "./dist/snap-components.es.js",
11+
"types": "./dist/snap-components.d.ts",
12+
"exports": {
13+
".": {
14+
"import": "./dist/snap-components.es.js",
15+
"require": "./dist/snap-components.cjs.js"
16+
}
17+
},
918
"repository": {
1019
"type": "git",
1120
"url": "https://github.com/EduardoAC/snap-components.git"
@@ -57,7 +66,8 @@
5766
"styled-components": "6.1.13",
5867
"typescript": "~5.6.3",
5968
"typescript-eslint": "^8.14.0",
60-
"vite": "^5.4.11"
69+
"vite": "^5.4.11",
70+
"vite-plugin-dts": "4.3.0"
6171
},
6272
"eslintConfig": {
6373
"extends": [

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
export * from "./components";
2+
export * from "./mixins";
3+
export * from "./theme";

src/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { defaultTheme } from "./default";
2+
export * from "./types";

vite.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
import { defineConfig } from "vite";
2+
import dts from "vite-plugin-dts";
23
import { resolve } from "node:path";
34
import react from "@vitejs/plugin-react";
45

56
// https://vite.dev/config/
67
export default defineConfig({
7-
plugins: [react()],
8+
plugins: [
9+
react(),
10+
dts({
11+
tsconfigPath: "./tsconfig.json",
12+
rollupTypes: true,
13+
exclude: ["**/*.stories.tsx"],
14+
}),
15+
],
816
resolve: {
917
alias: {
1018
"@mixins": resolve(__dirname, "src/mixins"),

0 commit comments

Comments
 (0)