Browse Source

organize tsconfig

Yuki Takei 4 years ago
parent
commit
8d2d14b4f7

+ 1 - 7
packages/app/tsconfig.base.json

@@ -1,9 +1,3 @@
 {
 {
-  "extends": "../../tsconfig.base.json",
-  "compilerOptions": {
-  },
-  "exclude": [
-    "node_modules",
-    "**/*.test.ts"
-  ]
+  "extends": "../../tsconfig.base.json"
 }
 }

+ 11 - 0
packages/core/tsconfig.base.json

@@ -0,0 +1,11 @@
+{
+  "extends": "../../tsconfig.base.json",
+  "compilerOptions": {
+  },
+  "include": [
+    "src"
+  ],
+  "exclude": [
+    "**/*.test.ts"
+  ]
+}

+ 2 - 8
packages/core/tsconfig.json

@@ -1,14 +1,8 @@
 {
 {
-  "extends": "../../tsconfig.base.json",
+  "extends": "./tsconfig.base.json",
   "compilerOptions": {
   "compilerOptions": {
     "baseUrl": ".",
     "baseUrl": ".",
     "paths": {
     "paths": {
-      "~/*": ["./src/*"],
     }
     }
-  },
-  "exclude": [
-    "node_modules",
-    "dist",
-    "**/*.test.ts"
-  ]
+  }
 }
 }

+ 1 - 11
packages/plugin-attachment-refs/tsconfig.json

@@ -1,13 +1,3 @@
 {
 {
-  "extends": "../../tsconfig.base.json",
-  "compilerOptions": {
-    "baseUrl": ".",
-    "paths": {
-    }
-  },
-  "exclude": [
-    "node_modules",
-    "dist",
-    "**/*.test.ts"
-  ]
+  "extends": "../../tsconfig.base.json"
 }
 }

+ 1 - 11
packages/plugin-pukiwiki-like-linker/tsconfig.json

@@ -1,13 +1,3 @@
 {
 {
-  "extends": "../../tsconfig.base.json",
-  "compilerOptions": {
-    "baseUrl": ".",
-    "paths": {
-    }
-  },
-  "exclude": [
-    "node_modules",
-    "dist",
-    "**/*.test.ts"
-  ]
+  "extends": "../../tsconfig.base.json"
 }
 }

+ 1 - 6
packages/ui/tsconfig.json

@@ -12,10 +12,5 @@
       "~/*": ["./src/*"],
       "~/*": ["./src/*"],
       "@growi/*": ["../*/src"]
       "@growi/*": ["../*/src"]
     }
     }
-  },
-  "exclude": [
-    "node_modules",
-    "dist",
-    "**/*.test.ts"
-  ]
+  }
 }
 }

+ 13 - 2
tsconfig.base.json

@@ -35,6 +35,17 @@
 
 
     /* Experimental Options */
     /* Experimental Options */
     "experimentalDecorators": true,
     "experimentalDecorators": true,
-    "emitDecoratorMetadata": true
-  }
+    "emitDecoratorMetadata": true,
+
+    /* default path aliases */
+    "baseUrl": ".",
+    "paths": {
+      "@growi/*": ["packages/*/src"],
+    }
+  },
+  "exclude": [
+    "node_modules",
+    "dist",
+    "**/*.test.ts"
+  ]
 }
 }