Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
6efe00abd9 | |||
d81b9dd213 | |||
751a5b8630 | |||
3c9e421351 | |||
fe05144a56 | |||
ad7035e5e3 | |||
49601f3bac | |||
6c13622b33 |
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",
|
"name": "@gitzone/tsdoc",
|
||||||
"version": "1.1.3",
|
"version": "1.1.7",
|
||||||
"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",
|
||||||
@ -19,8 +19,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@gitzone/tstest": "^1.0.52",
|
"@gitzone/tstest": "^1.0.52",
|
||||||
"@pushrocks/tapbundle": "^3.2.9",
|
"@pushrocks/tapbundle": "^3.2.14",
|
||||||
"@types/node": "^14.14.9",
|
"@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"
|
||||||
},
|
},
|
||||||
@ -31,8 +31,8 @@
|
|||||||
"@pushrocks/smartlog": "^2.0.39",
|
"@pushrocks/smartlog": "^2.0.39",
|
||||||
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
||||||
"@pushrocks/smartshell": "^2.0.26",
|
"@pushrocks/smartshell": "^2.0.26",
|
||||||
"typedoc": "^0.19.2",
|
"typedoc": "^0.20.30",
|
||||||
"typescript": "^4.1.2"
|
"typescript": "^4.2.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
|
@ -25,6 +25,7 @@ Platform support | [;
|
|||||||
import * as plugins from './tsdoc.plugins';
|
import * as plugins from './tsdoc.plugins';
|
||||||
import * as cli from './tsdoc.cli';
|
import * as cli from './tsdoc.cli';
|
||||||
early.stop();
|
early.stop();
|
||||||
cli.run();
|
|
||||||
|
export const runCli = async () => {
|
||||||
|
await cli.run();
|
||||||
|
};
|
||||||
|
@ -21,9 +21,7 @@ export class TypeDoc {
|
|||||||
this.typedocDirectory = dirPathArg;
|
this.typedocDirectory = dirPathArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async compile(options?: {
|
public async compile(options?: { publicSubdir?: string }) {
|
||||||
publicSubdir?: string;
|
|
||||||
}) {
|
|
||||||
const data = {
|
const data = {
|
||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
target: 'es2017',
|
target: 'es2017',
|
||||||
@ -33,14 +31,21 @@ export class TypeDoc {
|
|||||||
},
|
},
|
||||||
include: [],
|
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);
|
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}`
|
`typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir} ts/index.ts`
|
||||||
);
|
);
|
||||||
plugins.smartfile.fs.remove(paths.tsconfigFile);
|
plugins.smartfile.fs.remove(paths.tsconfigFile);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ export const run = async () => {
|
|||||||
tsdocCli.addCommand('typedoc').subscribe(async (argvArg) => {
|
tsdocCli.addCommand('typedoc').subscribe(async (argvArg) => {
|
||||||
const typeDocInstance = new TypeDoc(paths.cwd);
|
const typeDocInstance = new TypeDoc(paths.cwd);
|
||||||
await typeDocInstance.compile({
|
await typeDocInstance.compile({
|
||||||
publicSubdir: argvArg.publicSubdir
|
publicSubdir: argvArg.publicSubdir,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user