From 60b78e9a830104c76d0e1f9685d514b8a5d7d6a1 Mon Sep 17 00:00:00 2001 From: Soyu Kim Date: Wed, 12 Apr 2023 22:28:24 +0900 Subject: [PATCH] Add type declaration file --- package.json | 3 ++- tsconfig.json | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dce5069..a2361f8 100644 --- a/package.json +++ b/package.json @@ -19,12 +19,13 @@ "private": false, "main": "dist/stimulus-checkbox-select-all.umd.js", "module": "dist/stimulus-checkbox-select-all.mjs", + "types": "index.d.ts", "scripts": { "format": "prettier-standard '**/*.{ts,css,html}' --format", "lint": "prettier-standard '**/*.{ts,css,html}' --lint", "dev": "vite", "prod": "vite build --mode netlify", - "build": "tsc --noEmit && vite build", + "build": "tsc --noEmit false --declaration true --emitDeclarationOnly true --outDir . && vite build", "version": "yarn build", "test": "BABEL_ENV=test jest", "np": "np --no-2fa" diff --git a/tsconfig.json b/tsconfig.json index 7f6a651..9c76e70 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,5 +5,11 @@ "types": ["vite/client", "jest"], "skipLibCheck": true, "moduleResolution": "node" - } + }, + "exclude": [ + "dist" + ], + "include": [ + "src/**/*" + ] }