Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mieky/find-uses-of
Find uses of a Node module inside subdirectories
https://github.com/mieky/find-uses-of
Last synced: about 1 month ago
JSON representation
Find uses of a Node module inside subdirectories
- Host: GitHub
- URL: https://github.com/mieky/find-uses-of
- Owner: mieky
- License: mit
- Created: 2016-09-18T10:35:25.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-18T14:38:01.000Z (about 8 years ago)
- Last Synced: 2024-09-17T14:03:43.101Z (about 2 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# find-uses-of
[![npm version](https://badge.fury.io/js/find-uses-of.svg)](http://badge.fury.io/js/find-uses-of) [![Build Status](https://travis-ci.org/mieky/find-uses-of.svg?branch=master)](https://travis-ci.org/mieky/find-uses-of)
Find uses of a Node module inside subdirectories.
```bash
~/dev > find-uses-of eslint
Finding packages depending on eslint...
benson
find-uses-of
jestas
wappuapp-backend
wappuapp-client
yet-another-redux-example
```Starting from the current working directory, finds Node modules that have a given module as either a "dependency" or "devDependency" in their package.json.
Only walks the directory tree up to the first package.json, then moves to the next directory.
## Installation
$ npm install -g find-uses-of
**Requires Node 6** for its ES6 syntax support (spread, generators). Tested on Node v6.6.0.
### Using as a module
$ npm install --save find-uses-of
To use in your application:
const finder = require('find-uses-of');
finder.findUsesInPath(process.cwd(), "eslint")
.then(locations => locations.forEach(l => console.log(l)))
.catch(err => console.log(err));## Acknowledgements
This project is a grateful recipient of the [Futurice Open Source sponsorship program](http://futurice.com/blog/sponsoring-free-time-open-source-activities).
## License
[MIT](https://github.com/mieky/find-uses-of/blob/master/LICENSE)