Prechádzať zdrojové kódy

add ts source files and add prebuild script for typescript checks

mightyplow 5 rokov pred
rodič
commit
5de8c552bd
2 zmenil súbory, kde vykonal 7 pridanie a 2 odobranie
  1. 2 1
      package.json
  2. 5 1
      tsconfig.json

+ 2 - 1
package.json

@@ -6,7 +6,8 @@
   "scripts": {
     "clean": "rm -rf ./dist",
     "eslint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
-    "prebuild": "npm run clean",
+    "tscheck": "tsc --noEmit",
+    "prebuild": "npm run clean && npm run tscheck",
     "build": "parcel build -d dist --public-url ./ ./src/index.html",
     "predev": "npm run clean",
     "dev": "parcel serve -d dist --public-url / ./src/index.html",

+ 5 - 1
tsconfig.json

@@ -62,5 +62,9 @@
 
     /* Advanced Options */
     "forceConsistentCasingInFileNames": true  /* Disallow inconsistently-cased references to the same file. */
-  }
+  },
+
+  "include": [
+    "src/**/*"
+  ]
 }