From 154e6413bc0af0cec8708349d92a3199d820d217 Mon Sep 17 00:00:00 2001 From: Victor Kostyuk Date: Tue, 28 Jun 2022 01:51:29 +0200 Subject: [PATCH 1/2] refactor: get rid of `mv dist/src dist/types` --- package.json | 2 +- tsconfig.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 245c23a..726f2cf 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "types": "./dist/types/index.d.ts", "scripts": { "dev": "vite", - "build": "vite build && tsc --emitDeclarationOnly && mv dist/src dist/types", + "build": "vite build && tsc --emitDeclarationOnly", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "release": "node scripts/release.js" }, diff --git a/tsconfig.json b/tsconfig.json index ca9c7c8..2897c94 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "baseUrl": ".", - "outDir": "dist", + "outDir": "dist/types", "declaration": true, "sourceMap": false, "target": "esnext", @@ -10,7 +10,7 @@ "allowJs": false, "strict": true, "noUnusedLocals": true, - "rootDir": ".", + "rootDir": "src", "types": ["vite/client"] }, "include": [ From 271740020e60999f22aefce226311749cd7a2114 Mon Sep 17 00:00:00 2001 From: Victor Kostyuk Date: Tue, 28 Jun 2022 14:49:53 +0200 Subject: [PATCH 2/2] refactor: `--emitDeclarationOnly` moved to tsconfig --- package.json | 2 +- tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 726f2cf..f90e5d9 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "types": "./dist/types/index.d.ts", "scripts": { "dev": "vite", - "build": "vite build && tsc --emitDeclarationOnly", + "build": "vite build && tsc", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "release": "node scripts/release.js" }, diff --git a/tsconfig.json b/tsconfig.json index 2897c94..c0b4589 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "strict": true, "noUnusedLocals": true, "rootDir": "src", + "emitDeclarationOnly": true, "types": ["vite/client"] }, "include": [