redgin 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,15 @@
1
1
  # RedGin
2
- # Simplified library for building [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)
2
+ # ~5.3kb Simplified library for building [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components), works on Vanilla JS / all JS framework
3
+
4
+ * Use Javascript [Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) for Template syntax
5
+ * Rerender element with [<code>watch</code>](https://stackblitz.com/edit/typescript-t3fqo8?file=sampleWatch.ts)
6
+ * Create getter/setters with [<code>getset</code>](https://stackblitz.com/edit/typescript-t3fqo8?file=sampleWatch.ts)
7
+ * Create Property reflection with [<code>propReflect</code>](https://stackblitz.com/edit/typescript-hlms7u?file=index.html)
8
+ * Create Inline Events with [<code>event</code>](https://stackblitz.com/edit/typescript-t3fqo8?file=sampleWatch.ts)
9
+ * Create custom events with [<code>emit</code>](https://stackblitz.com/edit/redgin-childtoparent?file=index.ts)
10
+ * Inject Global Styles with [<code>injectStyles</code>](https://stackblitz.com/edit/redgin-bootstrap?file=index.ts)
11
+ * [Support Typescript](https://stackblitz.com/edit/typescript-ue61k6?file=index.ts)
3
12
 
4
- * Javascript [Template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) for Template syntax
5
- * Introduced Reactive Tags, Directives (watch, div, span, ...)
6
- * Getters/Setters is handled by RedGin
7
- * Inline Events
8
- * Vanilla JS, Works on all JS framework
9
13
 
10
14
 
11
15
  ## Use directly in browser
@@ -14,20 +18,43 @@
14
18
 
15
19
  <!DOCTYPE html>
16
20
  <html lang="en">
17
- <head>
18
- <script src="https://josnin.sgp1.digitaloceanspaces.com/redgin/dist/redgin.js"></script>
21
+ <head>
22
+ <meta charset="UTF-8">
23
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
24
+ <title>RedGin</title>
25
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
19
26
  </head>
20
27
  <body>
21
- <app-root></app-root>
22
-
23
- <script type="module">
24
- class AppRoot extends RedGin {
25
- render() {
26
- return ` This is app root! `
27
- }
28
- }
29
- customElements.define('app-root', AppRoot);
30
- </script>
28
+
29
+
30
+ <script type="module">
31
+
32
+ /* to handle flicker add spinner?? */
33
+ document.body.innerHTML = `
34
+ <div class="spinner-grow" role="status">
35
+ <span class="visually-hidden">Loading...</span>
36
+ </div>
37
+ `
38
+
39
+ import("https://josnin.sgp1.cdn.digitaloceanspaces.com/redgin/redgin.min.js")
40
+ .then( ({ injectStyles }) => {
41
+ /*
42
+ * inject global styles to all components
43
+ */
44
+ injectStyles.push('<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">')
45
+
46
+ /* load components */
47
+ import('./bootStrap.js')
48
+
49
+ /* to handle flicker */
50
+ document.body.innerHTML = `
51
+ <btn-bootstrap></btn-bootstrap>
52
+ `
53
+
54
+ })
55
+ .catch((err) => console.log(err))
56
+
57
+ </script>
31
58
 
32
59
  </body>
33
60
  </html>
@@ -39,7 +66,7 @@
39
66
  ### Inline Events
40
67
  it uses events tag ( click ) to create event listener behind the scene and automatically clear once the component is remove from DOM
41
68
  ```js
42
- import { RedGin, click } from 'red-gin.js';
69
+ import { RedGin, click } from 'https://josnin.sgp1.cdn.digitaloceanspaces.com/redgin/redgin.min.js';
43
70
 
44
71
  class Event extends RedGin {
45
72
  render() {
@@ -56,7 +83,7 @@ customElements.define('sample-event', Event);
56
83
  * dynamically create reactive props define in observedAttributes()
57
84
  * its uses watch directives to rerender inside html when value change
58
85
  ```js
59
- import { RedGin, watch } from 'red-gin.js';
86
+ import { RedGin, watch } from 'https://josnin.sgp1.cdn.digitaloceanspaces.com/redgin/redgin.min.js';
60
87
 
61
88
  class Loop extends RedGin {
62
89
 
@@ -89,7 +116,7 @@ customElements.define('sample-loop', Loop);
89
116
 
90
117
  ### IF condition (Static)
91
118
  ```js
92
- import { RedGin } from 'red-gin.js';
119
+ import { RedGin } from 'https://josnin.sgp1.cdn.digitaloceanspaces.com/redgin/redgin.min.js';
93
120
 
94
121
  class If extends RedGin {
95
122
  isDisabled = true
@@ -110,7 +137,7 @@ customElements.define('sample-if', If);
110
137
  * dynamically create reactive props define in observedAttributes()
111
138
  * its uses directive watch to rerender inside html when value change
112
139
  ```js
113
- import { RedGin, watch } from "./red-gin.js";
140
+ import { RedGin, watch } from "https://josnin.sgp1.cdn.digitaloceanspaces.com/redgin/redgin.min.js";
114
141
 
115
142
  class If extends RedGin {
116
143
 
@@ -138,7 +165,7 @@ customElements.define('sample-if', If);
138
165
  * recommend to use watch directive when rendering obj
139
166
  ```js
140
167
 
141
- obj = setget({
168
+ obj = getset({
142
169
  id:1,
143
170
  name:'John Doe'
144
171
  }, { forWatch: false } ) // forWatch default is true, for complex just define a setter/getter manually?
@@ -165,20 +192,7 @@ render() {
165
192
  }
166
193
  ```
167
194
 
168
- ### Render with Simplified tag (Reactive)
169
- * recommend to use div (span, etc.) directives for simple display of value
170
- ```js
171
- onInit(): void {
172
- this.id = 1;
173
- this.name = 'Joh Doe'
174
- }
175
-
176
- render() {
177
- return `
178
- ${ div('id') }
179
- ${ div('name') }`
180
- }
181
- ```
195
+
182
196
 
183
197
  ### PropReflect Custom
184
198
  Can only define single variable to each attr
@@ -200,8 +214,7 @@ npm install
200
214
  ## How to run development server?
201
215
  ```
202
216
  cd ~/Documents/redgin/
203
- npm run build
204
- npm start
217
+ npm run dev
205
218
  ```
206
219
 
207
220
  ## Help
@@ -1,10 +1,10 @@
1
1
  var D=Object.defineProperty;var L=(s,t,e)=>t in s?D(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var d=(s,t,e)=>(L(s,typeof t!="symbol"?t+"":t,e),e);var x=()=>crypto.randomUUID().split("-")[0],v=s=>s.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),u=s=>s.replace(/-./g,t=>t[1].toUpperCase());function A(s){let t=!1;for(let e of p.reg)t=e.call(this,s);return!0}var m=class{static define(t){m.reg.push(t)}},p=m;d(p,"reg",[]);var h={},b=class extends HTMLElement{};customElements.get("in-watch")||customElements.define("in-watch",b);var _=(s,t)=>{let e=document.createElement("in-watch"),o=x();for(let n of s)Object.hasOwn(h,n)||(h[n]={}),h[n][o]=t;return e.dataset.watch__=o,e.outerHTML};function T(s){let t=u(s),e=!1;if(Object.hasOwn(h,t)){for(let o of Object.keys(h[t]))if(this.shadowRoot){let n=this.shadowRoot.querySelector(`[data-watch__="${o}"]`);n&&(n.innerHTML=h[t][o]?h[t][o].call(this):this[t],e=!0)}}return e}p.define(T);var S=()=>crypto.randomUUID().split("-")[0];var U=[],f;(function(s){s[s.ADD=0]="ADD",s[s.REMOVE=1]="REMOVE"})(f||(f={}));var j=(s,t)=>{let e=S();return U.push([s,t,e]),`data-evt__=${e}`};function I(s,t,e){let o={detail:t,composed:!0},n=new CustomEvent(s,{...o,...e});this.shadowRoot&&this.shadowRoot.dispatchEvent(n)}function E(s){for(let t of U){let[e,o,n]=t;if(this.shadowRoot){let i=this.shadowRoot.querySelector(`[data-evt__="${n}"]`);i&&(s===f.ADD?i.addEventListener(e,o):i.removeEventListener(e,o))}}}function R(){E.call(this,f.ADD)}function O(){E.call(this,f.REMOVE)}function $(s,t){for(let e of c.reg)e.call(this,s,t)}var g=class{static define(t){g.reg.push(t)}},c=g;d(c,"reg",[]);var P=["^class$","^style$","^className$","^classList$","^id$","^dataset$","^data-","^aria-"],y=["disabled"],k=s=>{let t=!0;for(let e of P){let o=new RegExp(e,"g");if(s.match(o)){t=!1,console.error(`Please remove attribute '${s}' in the observedAttributes,
2
2
  DOM already provided built-in props reflection for this attribute.`);break}}return t};function B(s,t){if(t===void 0||t.name!="propReflect")return;let{type:e,value:o,serializerFn:n,deserializerFn:i}=t,l=this.constructor.observedAttributes,w=u(s),r=v(s);if(l===void 0||!l.includes(r)){console.error(`Unable to apply propReflect '${w}' for attribute '${r}',
3
- Please add '${r}' in the observedAttributes of ${this.constructor.name} component`);return}!k(r)||Object.defineProperty(this,w,{configurable:!0,set(a){if(i)return i.call(this,r,e,o,a);(e===Boolean||typeof a=="boolean"||y.includes(r))&&a===!0?this.setAttribute(r,""):(e===Boolean||y.includes(r))&&a===!1?this.removeAttribute(r):([Object,Array].includes(e)||["object","array"].includes(typeof a))&&a?this.setAttribute(r,JSON.stringify(a)):([String,Number].includes(e)||["string","number"].includes(typeof a))&&a?this.setAttribute(r,a):this.removeAttribute(r)},get(){if(n)return n.call(this,r,e,o);if(r in y||e===Boolean||typeof o=="boolean")return this.hasAttribute(r);if(([String,Array,Object].includes(e)||["string","array","object"].includes(typeof o))&&!this.hasAttribute(r))return o;if((e===String||typeof o=="string")&&this.hasAttribute(r))return this.getAttribute(r);if((e===Number||typeof o=="number")&&this.hasAttribute(r))return Number(this.getAttribute(r));if(([Array,Object].includes(e)||["array","object"].includes(typeof o))&&this.hasAttribute(r))return JSON.parse(this.getAttribute(r))}})}function M(s,t){return{value:s,...t,name:"propReflect"}}c.define(B);function N(s,t){if(t===void 0||t.name!="getset")return;let{value:e,forWatch:o}=t;this[`#${s}`]=e,Object.defineProperty(this,s,{configurable:!0,set(n){this[`#${s}`]=n,o&&this.updateContents(s)},get(){return this[`#${s}`]}})}function q(s,t){return{value:s,...{forWatch:!0},...t,name:"getset"}}c.define(N);var F={mode:"open",delegatesFocus:!0},H=[],K=[` /* Custom elements are display: inline by default,
3
+ Please add '${r}' in the observedAttributes of ${this.constructor.name} component`);return}!k(r)||Object.defineProperty(this,w,{configurable:!0,set(a){if(i)return i.call(this,r,e,o,a);(e===Boolean||typeof a=="boolean"||y.includes(r))&&a===!0?this.setAttribute(r,""):(e===Boolean||y.includes(r))&&a===!1?this.removeAttribute(r):([Object,Array].includes(e)||["object","array"].includes(typeof a))&&a?this.setAttribute(r,JSON.stringify(a)):([String,Number].includes(e)||["string","number"].includes(typeof a))&&a?this.setAttribute(r,a):this.removeAttribute(r)},get(){if(n)return n.call(this,r,e,o);if(r in y||e===Boolean||typeof o=="boolean")return this.hasAttribute(r);if(([String,Array,Object].includes(e)||["number","string","array","object"].includes(typeof o))&&!this.hasAttribute(r))return o;if((e===String||typeof o=="string")&&this.hasAttribute(r))return this.getAttribute(r);if((e===Number||typeof o=="number")&&this.hasAttribute(r))return Number(this.getAttribute(r));if(([Array,Object].includes(e)||["array","object"].includes(typeof o))&&this.hasAttribute(r))return JSON.parse(this.getAttribute(r))}})}function M(s,t){return{value:s,...t,name:"propReflect"}}c.define(B);function N(s,t){if(t===void 0||t.name!="getset")return;let{value:e,forWatch:o}=t;this[`#${s}`]=e,Object.defineProperty(this,s,{configurable:!0,set(n){this[`#${s}`]=n,o&&this.updateContents(s)},get(){return this[`#${s}`]}})}function q(s,t){return{value:s,...{forWatch:!0},...t,name:"getset"}}c.define(N);var F={mode:"open",delegatesFocus:!0},H=[],K=[` /* Custom elements are display: inline by default,
4
4
  * so setting their width or height will have no effect
5
5
  */
6
6
  :host { display: block; }
7
- `],C=class extends HTMLElement{constructor(){super(),this.attachShadow(F)}connectedCallback(){this._onInit(),this._onDoUpdate()}attributeChangedCallback(t,e,o){if(e===o)return;this.updateContents(t)&&this._onUpdated()}disconnectedCallback(){O.call(this)}updateContents(t){return A.call(this,t)}setEventListeners(){R.call(this)}setPropsBehavior(){let t=Object.getOwnPropertyNames(this);for(let e of t){let o=this[e];$.call(this,e,o)}}getStyles(t){let e=[],o=[],n=this.shadowRoot?.adoptedStyleSheets;for(let i of t)if(i.startsWith("<link"))e.push(i);else if(i.startsWith("@import")||!n){let l=document.createElement("style");l.innerHTML=i,e.push(l.outerHTML)}else{let l=new CSSStyleSheet;l.replaceSync(i),o.push(l)}return this.shadowRoot&&o.length>0&&(this.shadowRoot.adoptedStyleSheets=o),e.join("")}_onInit(){this.setPropsBehavior(),this.shadowRoot&&(this.shadowRoot.innerHTML=`
7
+ `],C=class extends HTMLElement{constructor(){super(),this.attachShadow(F)}connectedCallback(){this._onInit(),this._onDoUpdate()}attributeChangedCallback(t,e,o){if(e===o)return;this.updateContents(t)&&this._onUpdated()}disconnectedCallback(){O.call(this)}updateContents(t){return A.call(this,t)}setEventListeners(){R.call(this)}setPropsBehavior(){let t=Object.getOwnPropertyNames(this).filter(e=>e!="styles");for(let e of t){let o=this[e];$.call(this,e,o)}}getStyles(t){let e=[],o=[],n=this.shadowRoot?.adoptedStyleSheets;for(let i of t)if(i.startsWith("<link"))e.push(i);else if(i.startsWith("@import")||!n){let l=document.createElement("style");l.innerHTML=i,e.push(l.outerHTML)}else{let l=new CSSStyleSheet;l.replaceSync(i),o.push(l)}return this.shadowRoot&&o.length>0&&(this.shadowRoot.adoptedStyleSheets=o),e.join("")}_onInit(){this.setPropsBehavior(),this.shadowRoot&&(this.shadowRoot.innerHTML=`
8
8
  ${this.getStyles(H)}
9
9
  ${this.getStyles(K)}
10
10
  ${this.getStyles(this.styles)}
package/package.json CHANGED
@@ -1,18 +1,23 @@
1
1
  {
2
2
  "name": "redgin",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Simplified library for building web components",
5
+ "keywords": [
6
+ "redgin",
7
+ "web components",
8
+ "custom elements"
9
+ ],
5
10
  "main": "dist/redgin.min.js",
6
11
  "types": "dist/redgin.d.ts",
7
12
  "type": "module",
8
- "module": "dist/redgin.min.js",
9
13
  "engines": {
10
- "node": ">=16"
14
+ "node": ">=16.0.0"
11
15
  },
12
16
  "scripts": {
13
17
  "test": "echo \"Error: no test specified\" && exit 1",
14
18
  "build": "tsc -w",
15
- "start": "node server.js"
19
+ "bundle": "npx esbuild --bundle src/redgin.js --minify --sourcemap --format=esm --outfile=dist/redgin.min.js --target=es2022",
20
+ "dev": "node node_modules/vite/bin/vite.js"
16
21
  },
17
22
  "repository": {
18
23
  "type": "git",
@@ -25,19 +30,13 @@
25
30
  },
26
31
  "homepage": "https://github.com/josnin/redgin#readme",
27
32
  "dependencies": {
28
- "@fastify/static": "^5.0.0",
29
- "@types/node": "^18.11.14",
30
- "codelyzer": "^6.0.2",
31
- "esbuild": "^0.16.4",
32
- "fastify": "^3.21.0",
33
- "typescript": "^4.9.4"
33
+ "typescript": "^4.9.4",
34
+ "vite": "^4.0.4"
34
35
  },
35
36
  "devDependencies": {
36
- "@fastify/static": "^5.0.0",
37
37
  "@types/node": "^18.11.14",
38
38
  "codelyzer": "^6.0.2",
39
39
  "esbuild": "^0.16.4",
40
- "fastify": "^3.21.0",
41
40
  "typescript": "^4.9.4"
42
41
  }
43
42
  }
package/server.js DELETED
@@ -1,25 +0,0 @@
1
- const fastify = require('fastify')({ logger: true })
2
- const path = require('path');
3
-
4
- fastify.register(require('@fastify/static'), {
5
- root: path.join(__dirname, 'src'),
6
- wildcard: false
7
- })
8
-
9
- // Declare route
10
- fastify.get('/*', async (request, reply) => {
11
- return await reply.sendFile("index.html");
12
- })
13
-
14
- // run server
15
- const start = async () => {
16
- try {
17
- await fastify.listen( { port: 5068 })
18
- } catch (err) {
19
- fastify.log.error(err)
20
- process.exit(1)
21
- }
22
- }
23
-
24
- start()
25
-
package/tsconfig.json DELETED
@@ -1,110 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
- // "jsx": "preserve", /* Specify what JSX code is generated. */
17
- // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
-
27
- /* Modules */
28
- "module": "es2022", /* Specify what module code is generated. */
29
- // "rootDir": "./", /* Specify the root folder within your source files. */
30
- "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
31
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
- "paths": {
34
- "https://josnin.sgp1.cdn.digitaloceanspaces.com/redgin/redgin.min.js": [
35
- "./src/redgin.d.ts"
36
- ],
37
- },
38
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
39
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
40
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
41
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
42
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
43
- // "resolveJsonModule": true, /* Enable importing .json files. */
44
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
-
46
- /* JavaScript Support */
47
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50
-
51
- /* Emit */
52
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
54
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
57
- // "outDir": "./", /* Specify an output folder for all emitted files. */
58
- // "removeComments": true, /* Disable emitting comments. */
59
- // "noEmit": true, /* Disable emitting files from a compilation. */
60
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
61
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
62
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
63
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
64
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
65
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
66
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
- // "newLine": "crlf", /* Set the newline character for emitting files. */
69
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75
-
76
- /* Interop Constraints */
77
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
79
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
80
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
81
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
82
-
83
- /* Type Checking */
84
- "strict": true, /* Enable all strict type-checking options. */
85
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
86
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
87
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
88
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
89
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
90
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
91
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
92
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
93
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
94
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
95
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
96
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
97
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
98
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
99
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
100
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
101
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
102
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
103
-
104
- /* Completeness */
105
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
106
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
107
- },
108
- "exclude": ["node_modules", "**/node_modules/*"],
109
- "include": ["src", "dist"]
110
- }