Skip to content

Commit 432b035

Browse files
committed
messing with typedoc and tsconfig
2 parents 398165b + d118a17 commit 432b035

File tree

4 files changed

+30
-15
lines changed

4 files changed

+30
-15
lines changed

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test-frontend": "jest --verbose --coverage src/app",
1212
"test-on": "./node_modules/.bin/jest $1",
1313
"docker-test-lint": "eslint --ext .js --ext .jsx src",
14-
"docs": "typedoc --json docs --inputFiles src/app --inputFiles src/backend --readme docs/readme.md",
14+
"docs": "npx typedoc --tsconfig tsconfig.json",
1515
"format": "prettier --config .prettierrc './**/*.{ts,tsx,js,jsx}' --write"
1616
},
1717
"keywords": [
@@ -122,11 +122,18 @@
122122
"@babel/preset-env": "^7.23.6",
123123
"@babel/preset-react": "^7.23.3",
124124
"@babel/preset-typescript": "^7.23.3",
125+
"@types/chrome": "^0.0.254",
126+
"@types/jest": "^29.5.11",
127+
"@types/node": "^20.10.5",
125128
"babel-loader": "^9.1.3",
126129
"copy-webpack-plugin": "^11.0.0",
127130
"html-webpack-plugin": "^5.5.4",
131+
"typedoc": "^0.25.4",
128132
"typescript": "^5.3.3",
129133
"webpack": "^5.89.0",
130134
"webpack-cli": "^5.1.4"
135+
},
136+
"dependencies": {
137+
"express": "^4.18.2"
131138
}
132139
}

tsconfig.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/* Modules */
2828
"module": "commonjs", /* Specify what module code is generated. */
2929
// "rootDir": "./", /* Specify the root folder within your source files. */
30-
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
30+
"moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
3131
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
3232
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3333
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
@@ -39,7 +39,7 @@
3939
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
4040
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
4141
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42-
// "resolveJsonModule": true, /* Enable importing .json files. */
42+
"resolveJsonModule": true, /* Enable importing .json files. */
4343
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
4444
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
4545

@@ -56,7 +56,7 @@
5656
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
5757
// "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. */
5858
"outDir": "./src/extension/build/bundles/", /* Specify an output folder for all emitted files. */
59-
// "removeComments": true, /* Disable emitting comments. */
59+
"removeComments": true, /* Disable emitting comments. */
6060
// "noEmit": true, /* Disable emitting files from a compilation. */
6161
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
6262
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
@@ -74,15 +74,15 @@
7474
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
7575

7676
/* Interop Constraints */
77-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
77+
"isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
7878
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
79+
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
8080
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
8181
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
8282
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
8383

8484
/* Type Checking */
85-
"strict": true, /* Enable all strict type-checking options. */
85+
// "strict": true, /* Enable all strict type-checking options. */
8686
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
8787
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
8888
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@@ -105,5 +105,13 @@
105105
/* Completeness */
106106
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107107
"skipLibCheck": true /* Skip type checking all .d.ts files. */
108-
}
109-
}
108+
},
109+
// Specifies which files should be included in the compilation.
110+
"include": ["./src/**/*", "./src/backend", "./src/extension", "./global.d.ts"],
111+
"exclude": ["./src/app/__tests__", "./src/backend/__tests__", "node_modules", "./src/extension/build/bundles"],
112+
// "typeDocOptions": {
113+
// "mode": "file",
114+
// "out": "docs ",
115+
// "entryPointStrategy": "resolve"
116+
// }
117+
}

typedoc.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"mode": "modules",
3-
"out": "docs",
4-
"includes": ["./src/backend"],
5-
"exclude": ["**/__tests__/**", "**/**/**/build/**", "**/types/**"],
6-
"name": "Reactime 23.0"
7-
}
2+
"entryPoints": ["src"],
3+
"out": "docs/ src/app src/backend",
4+
"readme": "README.md",
5+
"exclude": ["**/*.spec.ts"],
6+
}

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const path = require('path');
66
*/
77

88

9+
910
// const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
1011

1112
const config = {

0 commit comments

Comments
 (0)