Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
6efe00abd9 | |||
d81b9dd213 | |||
751a5b8630 | |||
3c9e421351 | |||
fe05144a56 | |||
ad7035e5e3 |
1126
package-lock.json
generated
1126
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/tsdoc",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.7",
|
||||
"private": false,
|
||||
"description": "a tool for better documentation",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -19,8 +19,8 @@
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tstest": "^1.0.52",
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"@types/node": "^14.14.9",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^14.14.32",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
@ -31,8 +31,8 @@
|
||||
"@pushrocks/smartlog": "^2.0.39",
|
||||
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
||||
"@pushrocks/smartshell": "^2.0.26",
|
||||
"typedoc": "^0.19.2",
|
||||
"typescript": "^4.1.2"
|
||||
"typedoc": "^0.20.30",
|
||||
"typescript": "^4.2.3"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
@ -25,6 +25,7 @@ Platform support | [ {
|
||||
public async compile(options?: { publicSubdir?: string }) {
|
||||
const data = {
|
||||
compilerOptions: {
|
||||
target: 'es2017',
|
||||
@ -33,14 +31,21 @@ export class TypeDoc {
|
||||
},
|
||||
include: [],
|
||||
};
|
||||
data.include = [plugins.path.join(paths.cwd, './ts/**/*')];
|
||||
if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts'))) {
|
||||
data.include.push(plugins.path.join(paths.cwd, './ts/**/*'));
|
||||
}
|
||||
|
||||
if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts_web'))) {
|
||||
data.include.push(plugins.path.join(paths.cwd, './ts_web/**/*'));
|
||||
}
|
||||
|
||||
await plugins.smartfile.memory.toFs(JSON.stringify(data), paths.tsconfigFile);
|
||||
let targetDir = paths.publicDir;
|
||||
if (options?.publicSubdir) {
|
||||
targetDir = plugins.path.join(targetDir, options.publicSubdir);
|
||||
}
|
||||
await this.smartshellInstance.exec(
|
||||
`typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir}`
|
||||
`typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir} ts/index.ts`
|
||||
);
|
||||
plugins.smartfile.fs.remove(paths.tsconfigFile);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export const run = async () => {
|
||||
tsdocCli.addCommand('typedoc').subscribe(async (argvArg) => {
|
||||
const typeDocInstance = new TypeDoc(paths.cwd);
|
||||
await typeDocInstance.compile({
|
||||
publicSubdir: argvArg.publicSubdir
|
||||
publicSubdir: argvArg.publicSubdir,
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user