Skip to content

Commit

Permalink
Polish generated code (#15)
Browse files Browse the repository at this point in the history
* Clean up library exports and expose types

* Upgrade version
  • Loading branch information
EduardoAC authored Nov 17, 2024
1 parent 18c1a2b commit d36ced1
Show file tree
Hide file tree
Showing 5 changed files with 594 additions and 16 deletions.
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
{
"name": "snap-components",
"version": "0.0.6",
"type": "module",
"version": "0.0.7",
"author": "Eduardo Aparicio Cardenes",
"type": "module",
"files": [
"dist/*"
"dist"
],
"main": "./dist/snap-components.cjs.js",
"module": "./dist/snap-components.es.js",
"types": "./dist/snap-components.d.ts",
"exports": {
".": {
"import": "./dist/snap-components.es.js",
"require": "./dist/snap-components.cjs.js"
}
},
"repository": {
"type": "git",
"url": "https://github.com/EduardoAC/snap-components.git"
Expand Down Expand Up @@ -57,7 +66,8 @@
"styled-components": "6.1.13",
"typescript": "~5.6.3",
"typescript-eslint": "^8.14.0",
"vite": "^5.4.11"
"vite": "^5.4.11",
"vite-plugin-dts": "4.3.0"
},
"eslintConfig": {
"extends": [
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export * from "./components";
export * from "./mixins";
export * from "./theme";
1 change: 1 addition & 0 deletions src/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { defaultTheme } from "./default";
export * from "./types";
10 changes: 9 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
import { resolve } from "node:path";
import react from "@vitejs/plugin-react";

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [
react(),
dts({
tsconfigPath: "./tsconfig.json",
rollupTypes: true,
exclude: ["**/*.stories.tsx"],
}),
],
resolve: {
alias: {
"@mixins": resolve(__dirname, "src/mixins"),
Expand Down
Loading

0 comments on commit d36ced1

Please sign in to comment.