Get a list of paths to all of your projects.
- Useful for development scripts to automate your work.
- Makes a good starting point to find other paths.
- Works even within nested projects.
npm install project-dirs --save
Get it into your program.
const projectDirs = require('project-dirs');
Display the location of all top level projects.
projectDirs().then((dirs) => {
dirs.forEach((dir) => {
console.log('Project path:', dir);
});
});
Returns an Array
of paths for the topmost projects within your code directory.
Type: string
Default: process.cwd()
The directory of a project or one of its descendants, marking where to end the downwards search for projects.
- code-dir - Find the parent directory for top level projects
See our contributing guidelines for more details.
- Fork it.
- Make a feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
Go make something, dang it.