refactor: remove typedoc.json and update tsconfig.json includes
parent
6fa4442cef
commit
9503798742
File diff suppressed because it is too large
Load Diff
|
@ -16,25 +16,24 @@ const staticMessages = {
|
||||||
tokens: 'Define design tokens used by the component.'
|
tokens: 'Define design tokens used by the component.'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getTypeDoc = (typeDocOptions) => {
|
||||||
const app = new TypeDoc.Application();
|
const app = new TypeDoc.Application();
|
||||||
|
|
||||||
// If you want TypeDoc to load tsconfig.json / typedoc.json files
|
// If you want TypeDoc to load tsconfig.json / typedoc.json files
|
||||||
app.options.addReader(new TypeDoc.TSConfigReader());
|
app.options.addReader(new TypeDoc.TSConfigReader());
|
||||||
app.options.addReader(new TypeDoc.TypeDocReader());
|
//app.options.addReader(new TypeDoc.TypeDocReader());
|
||||||
|
|
||||||
app.bootstrap({
|
app.bootstrap({
|
||||||
// typedoc options here
|
// typedoc options here
|
||||||
name: 'PrimeVue',
|
|
||||||
entryPoints: [`src/`],
|
|
||||||
entryPointStrategy: 'expand',
|
entryPointStrategy: 'expand',
|
||||||
hideGenerator: true,
|
hideGenerator: true,
|
||||||
excludeExternals: true,
|
excludeExternals: false,
|
||||||
includeVersion: true,
|
includeVersion: true,
|
||||||
searchInComments: true,
|
searchInComments: true,
|
||||||
disableSources: true,
|
disableSources: true,
|
||||||
logLevel: 'Error',
|
logLevel: 'Error',
|
||||||
sort: ['source-order'],
|
sort: ['source-order'],
|
||||||
exclude: ['node_modules', 'src/**/*.js']
|
...typeDocOptions
|
||||||
});
|
});
|
||||||
|
|
||||||
const project = app.convert();
|
const project = app.convert();
|
||||||
|
@ -483,7 +482,9 @@ if (project) {
|
||||||
prop.comment.summary
|
prop.comment.summary
|
||||||
.map((s) => {
|
.map((s) => {
|
||||||
if (s.text.indexOf('[here]') > -1) {
|
if (s.text.indexOf('[here]') > -1) {
|
||||||
return `${s.text.slice(0, s.text.indexOf('[here]'))} <a target="_blank" href="${s.text.slice(s.text.indexOf('(') + 1, s.text.indexOf(')'))}">here</a> ${s.text.slice(s.text.indexOf(')') + 1)}`;
|
return `${s.text.slice(0, s.text.indexOf('[here]'))} <a target="_blank" href="${s.text.slice(s.text.indexOf('(') + 1, s.text.indexOf(')'))}">here</a> ${s.text.slice(
|
||||||
|
s.text.indexOf(')') + 1
|
||||||
|
)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.text || '';
|
return s.text || '';
|
||||||
|
@ -683,10 +684,21 @@ if (project) {
|
||||||
// app.generateJson(module, `./api-generator/module-typedoc.json`);
|
// app.generateJson(module, `./api-generator/module-typedoc.json`);
|
||||||
});
|
});
|
||||||
|
|
||||||
const typedocJSON = JSON.stringify(doc, null, 4);
|
return doc;
|
||||||
|
|
||||||
!fs.existsSync(outputPath) && fs.mkdirSync(outputPath);
|
|
||||||
fs.writeFileSync(path.resolve(outputPath, 'index.json'), typedocJSON);
|
|
||||||
|
|
||||||
// app.generateJson(project, `./api-generator/typedoc.json`);
|
// app.generateJson(project, `./api-generator/typedoc.json`);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const inlineDocs = getTypeDoc({
|
||||||
|
name: 'PrimeVue',
|
||||||
|
entryPoints: ['../../packages/primevue', '../../packages/forms']
|
||||||
|
});
|
||||||
|
|
||||||
|
const themeDocs = getTypeDoc({
|
||||||
|
name: 'PrimeUIX',
|
||||||
|
entryPoints: ['../../node_modules/@primeuix/themes/types']
|
||||||
|
});
|
||||||
|
|
||||||
|
!fs.existsSync(outputPath) && fs.mkdirSync(outputPath);
|
||||||
|
fs.writeFileSync(path.resolve(outputPath, 'index.json'), JSON.stringify({ ...inlineDocs, ...themeDocs }, null, 4));
|
||||||
|
|
|
@ -17,12 +17,8 @@
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"../../packages/primevue/src/**/*.d.ts",
|
"../../packages/primevue/src/**/*.d.ts",
|
||||||
"../../packages/primevue/src/**/style/*.d.ts",
|
|
||||||
"../../packages/themes/types",
|
|
||||||
"../packages/themes/src/**/**/index.js",
|
|
||||||
"../packages/forms/src/**/*.d.ts",
|
|
||||||
"../../packages/forms/src/**/*.d.ts",
|
"../../packages/forms/src/**/*.d.ts",
|
||||||
"../../packages/forms/src/**/style/*.d.ts"
|
"../../node_modules/@primeuix/themes/types/**/*.d.ts"
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules", "**/node_modules", "**/dist"]
|
"exclude": ["node_modules", "**/node_modules", "**/dist"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://typedoc.org/schema.json",
|
|
||||||
"entryPoints": ["../../packages/primevue", "../../packages/themes", "../../packages/forms"],
|
|
||||||
"sort": ["source-order"]
|
|
||||||
}
|
|
Loading…
Reference in New Issue