Licence
MIT
Version
1.0.1
Deps
1
Size
6 kB
Vulns
0
Weekly
0
list-projects
Given a root path, recursively searches subdirectories and lists basic information about node projects
npm install list-projects
The only function is listProjects which returns an array of Project objects.
interface {
path: string;
packageName: string;
dirName: string;
gitDirName?: string;
}
If the project is contained in a folder containing a .git directory (a git repo) then the name of the repo directory will be included.
TypeScript:
import { listProjects, Project } from 'list-projects';
const projects: Project[] = listProjects('(some directory to recursively search for node projects)');
JavaScript:
const { listProjects } = require('list-projects');
const projects = listProjects('(some directory to recursively search for node projects)');
I'm open to extending this to return other information about the directory, adding flags/options, etc.