Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
795ce9b014 | |||
9a84009f47 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsdoc",
|
"name": "@gitzone/tsdoc",
|
||||||
"version": "1.1.7",
|
"version": "1.1.8",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsdoc",
|
"name": "@gitzone/tsdoc",
|
||||||
"version": "1.1.7",
|
"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",
|
||||||
|
@ -31,12 +31,17 @@ export class TypeDoc {
|
|||||||
},
|
},
|
||||||
include: [],
|
include: [],
|
||||||
};
|
};
|
||||||
|
let startDirectory = '';
|
||||||
if (plugins.smartfile.fs.isDirectory(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/**/*'));
|
data.include.push(plugins.path.join(paths.cwd, './ts/**/*'));
|
||||||
|
startDirectory = 'ts';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts_web'))) {
|
if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts_web'))) {
|
||||||
data.include.push(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);
|
||||||
@ -45,7 +50,7 @@ export class TypeDoc {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user