North Pittsburgh Meatpackers
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    markdown-magic-directory-treepublic

    Directory tree plugin

    Add directory tree to markdown files via markdown-magic

    Install

    npm i markdown-magic markdown-magic-directory-tree --save-dev
    

    Adding 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.json
    ├── README.md
    └── yarn.lock
    

    Options

    • dir - process.cwd() by default
    • ignore - ['.git', '.gitkeep', '.gitignore', 'node_modules'] by default
    • depth - Infinity by default (how deep in the tree to traverse)
    • onlyDirs - false by default (how mnuch t)

    install

    npm i markdown-magic-directory-tree

    Downloadsweekly downloads

    94

    version

    1.2.3

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar