From efdb5b3bf8b3943bcc3dc458f1da6e3d9e7c90c2 Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Tue, 14 Sep 2021 16:18:59 +0200 Subject: [PATCH] chore: emit and publish types to npm (#29) * chore: emit and publish type to npm * fix: typings folder nesting --- package.json | 3 ++- tsconfig.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index de67c28..1399290 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,10 @@ "require": "./dist/petite-vue.umd.js" } }, + "types": "./dist/types/index.d.ts", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vite build && tsc --emitDeclarationOnly && mv dist/src dist/types", "prepublishOnly": "tsc --noEmit && yarn build" }, "repository": { diff --git a/tsconfig.json b/tsconfig.json index 869c4c4..ca9c7c8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "baseUrl": ".", "outDir": "dist", + "declaration": true, "sourceMap": false, "target": "esnext", "module": "esnext",