2.1.3 • Published 4 years ago

find-node-modules v2.1.3

Weekly downloads
419,002
License
MIT
Repository
github
Last release
4 years ago

find-node-modules

This is a little node module to find the path of every parent node_modules directory. It's useful for things like Sass, where you can't specify the exact path to individual modules (in which case findup-sync would be sufficient), and you can't just give an array of parent node_modules which might exist, because it will error if they don't.

In most cases you're trying to find node_modules directories, findup-sync should be sufficient. This library is specifically for if you want an array containing all the parent node_modules paths. If you loop through the output of this library, you should be using findup-sync instead.

Install

$ npm install --save find-node-modules

Usage

var findNodeModules = require('find-node-modules');

findNodeModules();
//=> ['node_modules', '../../node_modules']

findNodeModules({ cwd: './someDir' });
//=> ['../node_modules', '../../../node_modules']

findNodeModules('./someDir');
//=> ['../node_modules', '../../../node_modules']

findNodeModules({ cwd: './someDir', relative: false });
//=> ['/path/to/something/node_modules', '/path/node_modules']

License

This is released under the MIT license.

archetype-librarykbr-ebus-clientkbr-schedulerkbr-scheduler-clientmultimax-gateway-websmallfox-context@steven-torres/jsxrhenesis-clifs-debug@infinitebrahmanuniverse/nolb-find@everything-registry/sub-chunk-1669@merlion/ape-webpack-configfis3-parser-browserifytalib-cvxrnxj-commitizenvanilla-loadervue-dev-clonejedi-corejs-core-data-appjest-puppeteer-dockerjest-previewkatnipimpeditmodiinatichihatgulp-ui5-eager-preloadhydraformlibrary-coveragelocklift-verifierlockliftmakefile-for-jsmarkuplint-plugin-textlintlmn-gulp-tasksmdi-core@wekanteam/commitizen@wdio/lambda-runner@times-components/jest-configurator@times-components/jest-configurator-web@timeax/trim@trusk/commitizen@tyler.thayn/js.node.core@touk/federated-types@velop/server@vidiun-ng/dev-workspace@uyu423/pinpoint-node-agent@zalastax/nolb-findacquireangular-cli-toolsbabel-plugin-lessfrdrk-js-semaphoredumpster-fire-serverecho_222_module2eslint-import-resolver-resolvejsevanutilsexpo-adapter-workersfind-node-modulefindup-node-modulesfl-ng-searchbox@puresamari/ts-bundler@a-react-kit/state-core@3yourmind/sass-node-modules-importer@blazinaj/app-kit@byndyusoft/grpc-tools@broxus/locklift-verifierchromeocode-scopecommitioncommitizencommitizen-forked-sccommitizen-promisecmacc-compilercreate-from-templatecreate-react-microservicecssndev-sandboxbrowserify-cssbuilder-shared-dependenciesbuilder-shared-dependency-forkbuild-machine-serverbrickyard-cli@aimake/webpack-config@andoniabedul/vue-pronto@aliatech/loopback-mongo-aggregate-mixinjs-startstart-starwars-libstride-scriptstip4trs-commitizentwine-libtwine-libraryyangtao-jsvue-prontovue-v3-yandex-metrikawdio-lambda-runnerwebpack2-validatorwebpack-validatorunitxmy-ng2-cli-toolsmvc-scryptjs
2.1.3

4 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.0

7 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

11 years ago

1.0.0

11 years ago