Kaynağa Gözat

keep source consumers independent of generated config

Danilo Fragoso 2 gün önce
ebeveyn
işleme
edb29bfbd7
3 değiştirilmiş dosya ile 14 ekleme ve 5 silme
  1. 2 2
      package.json
  2. 3 0
      tsconfig.check.json
  3. 9 3
      tsconfig.json

+ 2 - 2
package.json

@@ -9,8 +9,8 @@
 		"prepare": "svelte-kit sync || echo ''",
 		"package": "svelte-kit sync && svelte-package && publint",
 		"prepublishOnly": "npm run package",
-		"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
-		"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
+		"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.check.json",
+		"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.check.json --watch"
 	},
 	"exports": {
 		".": {

+ 3 - 0
tsconfig.check.json

@@ -0,0 +1,3 @@
+{
+	"extends": ["./tsconfig.json", "./.svelte-kit/tsconfig.json"]
+}

+ 9 - 3
tsconfig.json

@@ -1,5 +1,4 @@
 {
-	"extends": "./.svelte-kit/tsconfig.json",
 	"compilerOptions": {
 		"allowJs": true,
 		"checkJs": true,
@@ -9,6 +8,13 @@
 		"skipLibCheck": true,
 		"sourceMap": true,
 		"strict": true,
-		"moduleResolution": "bundler"
-	}
+		"moduleResolution": "bundler",
+		"module": "esnext",
+		"target": "esnext",
+		"paths": {
+			"$lib": ["./src/lib"],
+			"$lib/*": ["./src/lib/*"]
+		}
+	},
+	"include": ["src/**/*"]
 }