diff --git a/.gitignore b/.gitignore index faf02f6..dd20396 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ types /geoblocks-print-*.tgz /ghpages /test_results/ +/lib diff --git a/package.json b/package.json index 71f1609..716f03b 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,13 @@ { "name": "@geoblocks/print", "version": "0.7.6", - "module": "dist/print.js", - "exports": { - ".": [ - "./dist/print.js", - "./src/main.ts" - ], - "./src/*": "./src/*" - }, + "module": "lib/print.js", + "main": "lib/print.js", "type": "module", - "types": "types/main.d.ts", + "types": "lib/types/main.d.ts", "files": [ - "dist/print.js", - "dist/print.js.map", - "types/*.d.ts" + "lib/*", + "src/*" ], "license": "BSD-2-Clause", "scripts": { @@ -24,6 +17,7 @@ "build": "tsc && vite build", "build-ghpages": "tsc && vite -c vite.config.ghpages.ts build", "preview": "vite -c vite.config.ghpages.ts preview", + "prepare": "tsc --pretty", "test": "jest" }, "peerDependencies": { diff --git a/tsconfig.json b/tsconfig.json index aa6147a..bc37a43 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,12 +2,12 @@ "compilerOptions": { "module": "esnext", "lib": ["es2020", "dom", "dom.iterable"], + "outDir": "./lib", + "inlineSourceMap": true, "declaration": true, - "emitDeclarationOnly": true, + "declarationDir": "./lib/types", "esModuleInterop": true, "isolatedModules": true, - "noEmit": false, - "outDir": "./types", "rootDir": "./src", "skipLibCheck": true, "strict": true,