Generates table of contents for markdown
<!-- TABLE_OF_CONTENTS_START -->
<!-- TABLE_OF_CONTENTS_END -->
import {readFileSync, writeFileSync} from 'fs';
import {generateUsageWaysOfNpmCliApps} from '@freephoenix888/generate-table-of-contents-for-markdown';
const generatedUsageWays = generateTableOfContentsForMarkdown({
markdownFilePath,
output: {
writeMode: 'replace-placeholder',
placeholder: {
start: `<!-- TABLE_OF_CONTENTS_START -->`,
end: `<!-- TABLE_OF_CONTENTS_END -->`,
},
filePath: 'README.md'
}
});
console.log(generatedUsageWays)
See Documentation for examples and API
Generated using TypeDoc