π¦ This package has moved. It now lives in the markdown-magic-plugins monorepo at
packages/directory-tree. This repository is archived; issues and contributions go to the monorepo.
Add directory tree to markdown files via markdown-magic
npm i markdown-magic markdown-magic-directory-tree --save-dev
See example.js for usage.
import path from 'path';
import { markdownMagic } from 'markdown-magic';
import DIRTREE from './index.js';
const config = {
matchWord: 'AUTO-GENERATED-CONTENT',
transforms: {
DIRTREE,
},
};
const markdownPath = path.join(import.meta.dirname, 'README.md');
await markdownMagic(markdownPath, config);
markdown-magic-directory-tree/
βββ __fixtures__/
βββ __snapshots__/
βββ .github/
βββ example.js
βββ index.js
βββ index.spec.js
βββ package-lock.json
βββ package.json
βββ README.md
process.cwd() by default['.git', '.gitkeep', '.gitignore', 'node_modules'] by defaultInfinity by default (how deep in the tree to traverse)false by default (how mnuch t)8 commits
2 commits
JavaScript
100.0%
π¦ This package has moved. It now lives in the markdown-magic-plugins monorepo at
packages/directory-tree. This repository is archived; issues and contributions go to the monorepo.
Add directory tree to markdown files via markdown-magic
npm i markdown-magic markdown-magic-directory-tree --save-dev
See example.js for usage.
import path from 'path';
import { markdownMagic } from 'markdown-magic';
import DIRTREE from './index.js';
const config = {
matchWord: 'AUTO-GENERATED-CONTENT',
transforms: {
DIRTREE,
},
};
const markdownPath = path.join(import.meta.dirname, 'README.md');
await markdownMagic(markdownPath, config);
markdown-magic-directory-tree/
βββ __fixtures__/
βββ __snapshots__/
βββ .github/
βββ example.js
βββ index.js
βββ index.spec.js
βββ package-lock.json
βββ package.json
βββ README.md
process.cwd() by default['.git', '.gitkeep', '.gitignore', 'node_modules'] by defaultInfinity by default (how deep in the tree to traverse)false by default (how mnuch t)8 commits
2 commits
JavaScript
100.0%