Compare commits

..

4 Commits

Author SHA1 Message Date
795ce9b014 1.1.8 2021-03-08 01:26:43 +00:00
9a84009f47 fix(core): update 2021-03-08 01:26:42 +00:00
6efe00abd9 1.1.7 2021-03-08 01:06:19 +00:00
d81b9dd213 fix(core): update 2021-03-08 01:06:18 +00:00
3 changed files with 20 additions and 11 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tsdoc", "name": "@gitzone/tsdoc",
"version": "1.1.6", "version": "1.1.8",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -2383,9 +2383,9 @@
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
}, },
"@types/node": { "@types/node": {
"version": "14.14.31", "version": "14.14.32",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.14.31.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.14.32.tgz",
"integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==" "integrity": "sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg=="
}, },
"@types/parcel-bundler": { "@types/parcel-bundler": {
"version": "1.12.3", "version": "1.12.3",

View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tsdoc", "name": "@gitzone/tsdoc",
"version": "1.1.6", "version": "1.1.8",
"private": false, "private": false,
"description": "a tool for better documentation", "description": "a tool for better documentation",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -20,7 +20,7 @@
"@gitzone/tsbuild": "^2.1.25", "@gitzone/tsbuild": "^2.1.25",
"@gitzone/tstest": "^1.0.52", "@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.14", "@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^14.14.31", "@types/node": "^14.14.32",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },

View File

@ -31,17 +31,26 @@ export class TypeDoc {
}, },
include: [], include: [],
}; };
data.include = [ let startDirectory = '';
plugins.path.join(paths.cwd, './ts/**/*'), if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts'))) {
plugins.path.join(paths.cwd, './ts_web/**/*'), data.include.push(plugins.path.join(paths.cwd, './ts/**/*'));
]; startDirectory = 'ts';
}
if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts_web'))) {
data.include.push(plugins.path.join(paths.cwd, './ts_web/**/*'));
if (!startDirectory) {
startDirectory = 'ts_web';
}
}
await plugins.smartfile.memory.toFs(JSON.stringify(data), paths.tsconfigFile); await plugins.smartfile.memory.toFs(JSON.stringify(data), paths.tsconfigFile);
let targetDir = paths.publicDir; let targetDir = paths.publicDir;
if (options?.publicSubdir) { if (options?.publicSubdir) {
targetDir = plugins.path.join(targetDir, options.publicSubdir); targetDir = plugins.path.join(targetDir, options.publicSubdir);
} }
await this.smartshellInstance.exec( await this.smartshellInstance.exec(
`typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir} ts/index.ts` `typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir} ${startDirectory}/index.ts`
); );
plugins.smartfile.fs.remove(paths.tsconfigFile); plugins.smartfile.fs.remove(paths.tsconfigFile);
} }