@sasjs/adapter 3.7.9 → 3.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/createTSDocs.js +35 -0
- package/index.js +2 -2
- package/node/index.js +2 -2
- package/package.json +3 -4
- package/src/SASViyaApiClient.ts +3 -1
- package/typedoc.json +7 -39
package/createTSDocs.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const td = require('typedoc')
|
|
2
|
+
const ts = require('typescript')
|
|
3
|
+
|
|
4
|
+
const typedocJson = require('./typedoc.json')
|
|
5
|
+
|
|
6
|
+
async function createTSDocs() {
|
|
7
|
+
if (!typedocJson.entryPoints?.length) {
|
|
8
|
+
throw new Error(
|
|
9
|
+
'Typedoc error: entryPoints option is missing in typedoc configuration.'
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (!typedocJson.out) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
'Typedoc error: out option is missing in typedoc configuration.'
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
const app = new td.Application()
|
|
19
|
+
app.options.addReader(new td.TSConfigReader())
|
|
20
|
+
|
|
21
|
+
app.bootstrap({
|
|
22
|
+
...typedocJson,
|
|
23
|
+
tsconfig: 'tsconfig.json'
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const project = app.converter.convert(app.getEntryPoints() ?? [])
|
|
27
|
+
|
|
28
|
+
if (project) {
|
|
29
|
+
await app.generateDocs(project, typedocJson.out)
|
|
30
|
+
} else {
|
|
31
|
+
throw new Error('Typedoc error: error creating the TS docs.')
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
createTSDocs()
|