فهرست منبع

Add Watch and Firefox Debug for 3.2

“Sebastien 7 سال پیش
والد
کامیت
d27b44f047
3فایلهای تغییر یافته به همراه41 افزوده شده و 10 حذف شده
  1. 18 0
      .vscode/launch.json
  2. 16 2
      Tools/Gulp/gulpfile.js
  3. 7 8
      src/tsconfig.json

+ 18 - 0
.vscode/launch.json

@@ -125,6 +125,24 @@
             ]
         },
         {
+            "name": "Launch Local Dev (Experimental Firefox)",
+            "type": "firefox",
+            "request": "launch",
+            "reAttach": true,
+            "url": "http://localhost:1338/localDev/index.html",
+            "pathMappings": [{
+                "url": "http://localhost:1338",
+                "path": "${workspaceFolder}"
+            }],
+            "preLaunchTask": "run",
+            "log": {
+                "consoleLevel": {
+                    "PathConversion": "Debug",
+                    "default": "Error"
+                }
+            }
+        },
+        {
             "name": "Launch Build Validation (Chrome)",
             "type": "chrome",
             "request": "launch",

+ 16 - 2
Tools/Gulp/gulpfile.js

@@ -481,12 +481,26 @@ gulp.task("typescript-all", function (cb) {
 });
 
 /**
+ * Watch ts files from typescript .
+ */
+gulp.task("srcTscWatch", function() {
+    // Reuse The TSC CLI from gulp to enable -w.
+    process.argv[2] = "-w";
+    process.argv[3] = "-p";
+    process.argv[4] = "../../src/tsconfig.json";
+    require("./node_modules/typescript/lib/tsc.js");
+});
+
+/**
  * Watch ts files and fire repective tasks.
  */
-gulp.task("watch", [], function () {
+gulp.task("watch", ["srcTscWatch"], function () {
     forceCompile = true;
     var interval = 1000;
-    var tasks = [gulp.watch(config.typescript, { interval: interval }, ["typescript-compile"])];
+
+    // Keep during Prod Tests of srcTscWatch.
+    // var tasks = [gulp.watch(config.typescript, { interval: interval }, ["typescript-compile"])];
+    var tasks = [];
 
     config.modules.map(function (module) {
         config[module].libraries.map(function (library) {

+ 7 - 8
src/tsconfig.json

@@ -1,20 +1,19 @@
 {
   "compileOnSave": true,
   "compilerOptions": {
-    "experimentalDecorators": true,
-    "module": "commonjs",
+    "noResolve": true,
     "target": "es5",
+    "declaration": true,
+    "experimentalDecorators": true,
+    "isolatedModules": false,
     "sourceMap": true,
+    "types": [],
     "noImplicitAny": true,
-    "lib": [
-      "dom",
-      "es2015.promise",
-      "es5"
-    ],
     "noImplicitReturns": true,
     "noImplicitThis": true,
     "noUnusedLocals": true,
     "strictNullChecks": true,
-    "strictFunctionTypes": true
+    "strictFunctionTypes": true,
+    "skipLibCheck": true
   }
 }