2.1.3 • Published 2 years ago

find-node-modules v2.1.3

Weekly downloads
419,002
License
MIT
Repository
github
Last release
2 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-configlibrary-coveragelmn-gulp-taskshihathydraformkatnipgogency-test-2gogencyinaticjedi-corejest-puppeteer-dockerjest-previewlockliftlocklift-verifiernappjsng-searchboxmocktoolsmodule-federation-types-loadermarkuplint-plugin-textlintmpesa-cookiempesa-cookie-jarmvc-scryptjsjs-core-data-appjs-startmy-ng2-cli-toolsmy-commitizenmakefile-for-jsmiguelcostero-ng2-toastynodejstestitnpm-dtsmdi-coreecho_222_module2dumpster-fire-servergulp-ui5-eager-preloadfis3-parser-browserifyfl-ng-searchboxfind-node-modulefindup-node-modulesfrdrk-js-semaphoreexpo-adapter-workerseslint-import-resolver-resolvejsevanutilsrafterpolymerx-clipadlparcel-plugin-closurepockethscryptlibscryptlib-btc@dxv/cli@gotoeasy/csjs@haechi-labs/vvisp-utils@haechi-labs/henesis-cli@hadeshe93/eslint-config-hh@hadeshe93/lib-node@hadeshe93/wpconfig-corexj-commitizen@heisea/navim@htho/npm-dts@il2js/codegen@il2js/core@hungry/bulma-themetwine-libtwine-libraryvue-dev-clonevue-prontotip4unitxvue-v3-yandex-metrika@iold/old-webpack-config@mega-tool/create-mega-app@kaltura-ng/dev-workspace@kalkanisys/vue-select@modern-js/plugin-unbundle@innodata/vue-v3-ya-metrika@joeybaker/hihatwebpack2-validatorwebpack-validatoryangtao-jswdio-lambda-runnertrs-commitizenvanilla-loader@lokse/core@lordbeanbag/vite-plugin-svg-icons-monorepo@factor/build-paths@factor/paths@factor/tools@factor/service-firebase-functions-build@fairyfromalfeya/locklift
2.1.3

2 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

4 years ago

2.0.0

5 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago