add docs for all exported modules
This commit is contained in:
@@ -1,4 +1,22 @@
|
||||
import { packageJsonExports } from './devops/package/meta.js';
|
||||
|
||||
const excludePaths = ['./src/external', '.src/apps'];
|
||||
const entryPoints = [];
|
||||
|
||||
for (const [key, value] of Object.entries(packageJsonExports || {})) {
|
||||
if (value) {
|
||||
let path = value.replace(/^\.\/dist-cms/, './src');
|
||||
path = path.replace('.js', '.ts');
|
||||
|
||||
if (excludePaths.some((excludePath) => path.startsWith(excludePath))) {
|
||||
console.log('excluding', path);
|
||||
} else {
|
||||
entryPoints.push(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
entryPoints: ['./src/packages/core/index.ts', './src/packages/data-type/index.ts'],
|
||||
entryPoints,
|
||||
out: 'api-docs',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user