Browse Source

2.6: inheriting configuration.

Frederic G. MARAND 5 years ago
parent
commit
2b0884116d
6 changed files with 29 additions and 23 deletions
  1. 1 1
      .gitignore
  2. 9 0
      app/tsconfig.json
  3. 1 1
      output.js
  4. 1 1
      output.js.map
  5. 17 0
      tsconfig.base.json
  6. 0 20
      tsconfig.json

+ 1 - 1
.gitignore

@@ -4,4 +4,4 @@
 /yarn.lock
 
 # Built output.
-/output.js*
+/js/*

+ 9 - 0
app/tsconfig.json

@@ -0,0 +1,9 @@
+{
+  "extends": "../tsconfig.base.json",
+  "compilerOptions": {
+    "removeComments": true
+  },
+  "include": [
+    "./**/*"
+  ]
+}

+ 1 - 1
js/app.js → output.js

@@ -4,4 +4,4 @@ function startGame() {
     messagesElement.innerText = 'Welcome to MultiMath! Starting a new game';
 }
 document.getElementById('startGame').addEventListener('click', startGame);
-//# sourceMappingURL=app.js.map
+//# sourceMappingURL=output.js.map

+ 1 - 1
js/app.js.map → output.js.map

@@ -1 +1 @@
-{"version":3,"file":"app.js","sourceRoot":"","sources":["../app/app.ts"],"names":[],"mappings":"AAAA;IACE,uBAAuB;IACvB,IAAM,eAAe,GAAG,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC5D,eAAe,CAAC,SAAS,GAAG,2CAA2C,CAAC;AAC1E,CAAC;AAED,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}
+{"version":3,"file":"output.js","sourceRoot":"","sources":["app/app.ts"],"names":[],"mappings":"AAAA;IACE,uBAAuB;IACvB,IAAM,eAAe,GAAG,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAC5D,eAAe,CAAC,SAAS,GAAG,2CAA2C,CAAC;AAC1E,CAAC;AAED,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC"}

+ 17 - 0
tsconfig.base.json

@@ -0,0 +1,17 @@
+{
+  "compilerOptions": {
+    /* Basic Options */
+    "target": "es5",
+    // "module": "commonjs",
+    "sourceMap": true,
+    "outDir": "js",
+    // "outFile": "output.js",
+    // "watch": true,
+
+    /* Strict Type-Checking Options */
+    "noImplicitAny": false,
+
+    /* Additional Checks */
+    "noUnusedLocals": true
+  }
+}

+ 0 - 20
tsconfig.json

@@ -1,20 +0,0 @@
-{
-  "compilerOptions": {
-    /* Basic Options */
-    "target": "es5",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
-    // "module": "commonjs",                  /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015' */
-    "sourceMap": true,                        /* Generates corresponding '.map' file. */
-    "outDir": "js",
-    // "outFile": "output.js",                   /* Concatenate and emit output to single file. */
-    // "watch": true,
-
-    /* Strict Type-Checking Options */
-    "noImplicitAny": false,                   /* Raise error on expressions and declarations with an implied 'any' type. */
-
-    /* Additional Checks */
-    "noUnusedLocals": true                    /* Report errors on unused locals. */
-  },
-  "files": [
-    "app/app.ts"
-  ]
-}