Skip to content

Commit

Permalink
Merge pull request #3 from fullstorydev/sans-dts
Browse files Browse the repository at this point in the history
Sans dts
  • Loading branch information
bateman001 authored Dec 2, 2024
2 parents d9192cd + 4cfe4e1 commit aff32a1
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 118 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ dist

/dist
/node_modules
/types

.DS_Store

Expand Down
194 changes: 88 additions & 106 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
"rollup": "rollup -c",
"clean": "rm -rf dist types",
"build": "npm run clean && tsc && rollup -c",
"test": "jest",
"pub": "npm run rollup && npm publish",
"storybook": "storybook dev -p 6006",
Expand Down Expand Up @@ -40,7 +41,6 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"rollup": "^4.21.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"storybook": "^8.2.9",
Expand Down
7 changes: 0 additions & 7 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import dts from "rollup-plugin-dts";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import postcss from "rollup-plugin-postcss";

Expand Down Expand Up @@ -31,11 +30,5 @@ export default [
peerDepsExternal(),
terser()
]
},
{
input: "dist/esm/types/index.d.ts",
output: [{ file: "dist/index.d.ts", format: "esm" }],
plugins: [dts()],
external: [/\.css$/]
}
];
11 changes: 8 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
"skipLibCheck": true,
"jsx": "react",
"module": "ESNext",
"declaration": true,
"declarationDir": "types",
"declaration": true, // Enable generation of declaration (.d.ts) files
"declarationMap": true,
"declarationDir": "dist",
"sourceMap": false,
"outDir": "dist",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"emitDeclarationOnly": true
}
},
"include": [
"src/**/*" // Your source files
],
"exclude": ["node_modules"]
}

0 comments on commit aff32a1

Please sign in to comment.