Browse Source

fixing jenkins

Daniel Zlotin 6 years ago
parent
commit
9ae12e6e9c
2 changed files with 10 additions and 1 deletions
  1. 7
    0
      scripts/gen-doc.js
  2. 3
    1
      scripts/gen-doc/MarkdownCreator.ts

+ 7
- 0
scripts/gen-doc.js View File

@@ -0,0 +1,7 @@
1
+const exec = require('shell-utils').exec;
2
+
3
+run();
4
+
5
+function run() {
6
+  exec.execSync(`ts-node `);
7
+}

+ 3
- 1
scripts/gen-doc/MarkdownCreator.ts View File

@@ -18,12 +18,14 @@ export class MarkdownCreator {
18 18
 
19 19
   private readMethods(reflection: Typedoc.DeclarationReflection) {
20 20
     const methodReflections = reflection.getChildrenByKind(Typedoc.ReflectionKind.Method);
21
+
21 22
     methodReflections.sort((a, b) => a.sources[0].line - b.sources[0].line);
23
+
22 24
     return methodReflections.map((methodReflection) => ({
23 25
       name: methodReflection.name,
24 26
       arguments: this.readArguments(methodReflection.signatures[0].parameters || []),
25 27
       returnType: methodReflection.signatures[0].type.toString(),
26
-      source: `${methodReflection.sources[0].fileName}#${methodReflection.sources[0].line}`,
28
+      source: `/docs/api/${methodReflection.sources[0].fileName}#${methodReflection.sources[0].line}`,
27 29
       comment: methodReflection.signatures[0].comment ? methodReflection.signatures[0].comment.shortText : ''
28 30
     }));
29 31
   }