1.2.4 • Published 4 years ago
markdown-magic-directory-tree v1.2.4
Directory tree plugin
Add directory tree to markdown files via markdown-magic
Install
npm i markdown-magic markdown-magic-directory-tree --save-devAdding the plugin
See example.js for usage.
const fs = require('fs');
const path = require('path');
const markdownMagic = require('markdown-magic');
const config = {
transforms: {
DIRTREE: require('./index.js'),
},
};
const markdownPath = path.join(__dirname, 'README.md');
markdownMagic(markdownPath, config);Usage in markdown
markdown-magic-directory-tree/
├── .npmrc
├── example.js
├── index.js
├── package-lock.json
├── package.json
└── README.mdOptions
- dir -
process.cwd()by default - ignore -
['.git', '.gitkeep', '.gitignore', 'node_modules']by default - depth -
Infinityby default (how deep in the tree to traverse) - onlyDirs -
falseby default (how mnuch t)