A Node.js directory tree builder
I initially tried using directory-tree, but found it wasn't flexible enough
npm i @ngsctt/arborist
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)
This project is released under the MIT Licence.