2.1.3 • Published 3 years ago

find-node-modules v2.1.3

Weekly downloads
419,002
License
MIT
Repository
github
Last release
3 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@criticalmanufacturing/dev-tasks@dionlarson/commitizen@byndyusoft/grpc-tools@payloadcms/plugin-cloud-storage@payloadcms/bundler-webpack@peak-stone/commitizen-promisejedi-corejs-core-data-appjest-puppeteer-dockerjest-previewkatnipjs-startstart-starwars-libstride-scriptstip4trs-commitizentwine-libtwine-library@andoniabedul/vue-pronto@aimake/webpack-config@aliatech/loopback-mongo-aggregate-mixin@blazinaj/app-kit@broxus/locklift-verifier@3yourmind/sass-node-modules-importer@a-react-kit/state-coreyangtao-jsvue-prontovue-v3-yandex-metrikawdio-lambda-runnerwebpack2-validatorwebpack-validatorunitx@dxv/cli@haechi-labs/vvisp-utils@hadeshe93/eslint-config-hh@hadeshe93/lib-node@hadeshe93/wpconfig-core@heisea/navim@haechi-labs/henesis-cli@htho/npm-dts@hungry/bulma-theme@gotoeasy/csjs@innodata/vue-v3-ya-metrika@kontorol-ng/dev-workspace@l3v1k/tsc-alias@lokse/core@lordbeanbag/vite-plugin-svg-icons-monorepo@mrapi/core@marionebl/git-cz@factor/tools@factor/build-paths@fairyfromalfeya/locklift@factor/paths@factor/service-firebase-functions-build@mega-tool/create-mega-app@modern-js/plugin-unbundle@kaltura-ng/dev-workspace@kalkanisys/vue-select@iold/old-webpack-config@joeybaker/hihat@il2js/codegen@il2js/core@pzlr/build-core@ryansonshine/commitizen@puresamari/ts-bundler@ris/webpack-config@pinpt/changelog@pinpt/changelog-generator@snapfrozen/snapflow-cli@seculum/vue-dev-clonemy-ng2-cli-toolsmvc-scryptjsmy-commitizenmpesa-cookiempesa-cookie-jarmodule-federation-types-loadermocktoolsmiguelcostero-ng2-toastynappjspadlparcel-plugin-closurescryptlib
2.1.3

3 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago