Skip to content

Commit 1349e1d

Browse files
committed
feat(build): output and add types to package
1 parent 801700f commit 1349e1d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "react-confetti",
33
"version": "2.4.1",
44
"description": "React component to draw confetti for your party.",
5-
"main": "index.js",
5+
"main": "dist/react-confetti.min.js",
6+
"types": "dist/types/ReactConfetti.d.ts",
67
"repository": {
78
"type": "git",
89
"url": "https://github.com/alampros/react-confetti.git"
@@ -26,7 +27,8 @@
2627
"index.js"
2728
],
2829
"scripts": {
29-
"build": "rollup -c",
30+
"build": "tsc && rollup -c",
31+
"prebuild": "yarn clean",
3032
"develop": "rollup -c -w",
3133
"test": "tsc; yarn run lint",
3234
"clean": "git clean -xfd dist/",

tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"compilerOptions": {
33
"target": "esnext",
4+
"module": "commonjs",
45
"moduleResolution": "node",
5-
"allowJs": true,
6+
"declaration": true,
7+
"declarationDir": "dist/types",
68
"jsx": "preserve",
7-
"noEmit": true,
9+
"emitDeclarationOnly": true,
810
"strict": true,
9-
"isolatedModules": true,
1011
"esModuleInterop": true
1112
},
1213
"include": [

0 commit comments

Comments
 (0)