0.2.1 • Published 4 years ago

@ngsctt/arborist v0.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

arborist

What

A Node.js directory tree builder

Why

I initially tried using directory-tree, but found it wasn't flexible enough

How

Installation

npm i @ngsctt/arborist

Usage

const arborist = require('@ngsctt/arborist');

const rootDir = 'directory';      // relative to __dirname
const options = {
  stats: ["birthtime", "mtime"],  // lstatSync properties to include
  path: ["dir", "base", "name"],  // Node path properties to include
  exclude: ["^.DS_Store", "^_"]   // globs to exclude
}
const maxDepth = 10;              // maximum depth of tree

const tree = arborist(rootDir, options, maxDepth)

Licence

This project is released under the MIT Licence.

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago