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-clone@byndyusoft/grpc-tools@payloadcms/plugin-cloud-storage@payloadcms/bundler-webpack@peak-stone/commitizen-promisejedi-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-less@gotoeasy/csjs@3yourmind/sass-node-modules-importer@a-react-kit/state-core@haechi-labs/henesis-cli@haechi-labs/vvisp-utils@hadeshe93/eslint-config-hh@hadeshe93/lib-node@hadeshe93/wpconfig-core@aimake/webpack-config@criticalmanufacturing/dev-tasks@aliatech/loopback-mongo-aggregate-mixinjs-startstart-starwars-libstride-scriptstip4trs-commitizentwine-libtwine-library@blazinaj/app-kit@broxus/locklift-verifieryangtao-jsvue-prontovue-v3-yandex-metrikawdio-lambda-runnerwebpack2-validatorwebpack-validatorunitx@kontorol-ng/dev-workspace@l3v1k/tsc-alias@lokse/core@lordbeanbag/vite-plugin-svg-icons-monorepo@mrapi/core@modern-js/plugin-unbundle@kaltura-ng/dev-workspace@kalkanisys/vue-select@ryansonshine/commitizen@puresamari/ts-bundler@ris/webpack-config@pinpt/changelog@pinpt/changelog-generator@seculum/vue-dev-clonemy-ng2-cli-toolsmvc-scryptjsmy-commitizenmpesa-cookiempesa-cookie-jar
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