Skip to content

Commit

Permalink
fix: type exports (#17)
Browse files Browse the repository at this point in the history
* fix type exports

* add changeset
  • Loading branch information
baseballyama committed May 7, 2023
1 parent 948f886 commit 9bbcc70
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-donuts-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-preprocess-delegate-events': patch
---

fix type exports
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,7 @@ dist

test/fixture/**/actual.svelte
.node-version
types
types
preprocess
runtime
index.d.ts
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test/fixture/**/output.svelte
@types/svelte-jsx.d.ts
pnpm-lock.yaml
types/
preprocess/
runtime/
index.d.ts
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
},
"homepage": "https://github.com/baseballyama/svelte-preprocess-delegate-events#readme",
"files": [
"types/*",
"preprocess/*",
"runtime/*",
"index.d.ts",
"src/*",
"!/**/test",
"!/**/spec"
],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./types/index.d.ts",
"import": "./src/index.js"
}
"./preprocess": "./src/preprocess/index.js",
"./runtime": "./src/runtime/index.js"
},
"main": "src/index.js",
"types": "./types/index.d.ts",
"main": "./src/index.js",
"types": "./index.d.ts",
"scripts": {
"format:check": "prettier --cache --check .",
"format:fix": "prettier --cache --write .",
Expand All @@ -42,7 +42,7 @@
"test:types": "svelte-check --tsconfig ./tsconfig.json",
"test:all": "pnpm format:check && pnpm test && pnpm test:types && pnpm publish:check",
"test:coverage": "vitest run --coverage",
"type:gen": "rm -rf ./types && tsc -p tsconfig.build.json",
"type:gen": "rm -rf ./preprocess && rm -rf ./runtime && tsc -p tsconfig.build.json",
"update:version": "changeset version",
"release": "changeset publish"
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as preprocess from './preprocess/index.js';
import preprocess from './preprocess/index.js';
import * as runtime from './runtime/index.js';

export { preprocess, runtime };
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
"allowUnusedLabels": true,
"allowUnreachableCode": true,
"skipLibCheck": true,
"outDir": "types",
"declaration": true,
"declarationDir": "./types",
"declarationDir": ".",
"emitDeclarationOnly": true,
"lib": ["ES2015", "DOM"],
"typeRoots": ["@types"]
Expand Down

0 comments on commit 9bbcc70

Please sign in to comment.