Skip to content

Commit

Permalink
feat: add *.d.ts into dist file
Browse files Browse the repository at this point in the history
  • Loading branch information
logeast committed Aug 1, 2023
1 parent ad93f0e commit 51a6289
Show file tree
Hide file tree
Showing 12 changed files with 503 additions and 114 deletions.
2 changes: 1 addition & 1 deletion examples/vanilla-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"vite": "^4.4.5"
},
"dependencies": {
"magic-lottery": "^1.2.0"
"magic-lottery": "^1.2.2"
}
}
8 changes: 4 additions & 4 deletions examples/vanilla-basic/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion examples/vanilla-basic/src/lottery.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MagicLottery from "../../../dist/magic-lottery.js";
import MagicLottery from "magic-lottery";

const lottery = new MagicLottery([]);

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script type="module" src="/src/index.ts"></script>
</body>
</html>
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@
"winner"
],
"files": [
"dist"
"dist",
"src"
],
"main": "./dist/magic-lottery.umd.cjs",
"module": "./dist/magic-lottery.js",
"exports": {
".": {
"import": "./dist/magic-lottery.js",
"require": "./dist/magic-lottery.umd.cjs"
}
},
"main": "lib/index.umd.cjs",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand All @@ -52,7 +48,8 @@
"eslint": "^8.45.0",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"vite-plugin-dts": "^3.4.0",
"vitepress": "1.0.0-beta.6",
"vitest": "^0.33.0"
}
}
}

0 comments on commit 51a6289

Please sign in to comment.