diff --git a/README.md b/README.md index e427a8a..6da0690 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,14 @@ Type: `string` Default: the closest directory containing `package.json` or `bower.json` (depending on `packageManager` specified) when going up the tree, starting from the current one +### depsDir + +Path to the directory containing `node_modules` or `bower_components`. + +Type: `string` + +Default: `undefined`. By default, check-dependencies will use the `packageDir` option. + ### onlySpecified Ensures all installed dependencies are specified in `package.json` or `bower.json`. @@ -125,6 +133,22 @@ Type: `boolean` Default: `false` +### checkGitUrls + +By default, check-dependencies will skip version check for packages whose version contains the full repository path. For example: + +```js + "dependencies": { + "semver": "https://github.com/npm/node-semver.git#0.5.9" + } +``` + +If checkGitUrls is enabled, check-dependencies will parse the version number (after the path to the git repository and the hash) and check it against the version of the installed package. + +Type: `boolean` + +Default: `false` + ### verbose Prints messages to the console. diff --git a/lib/check-dependencies.js b/lib/check-dependencies.js index ce95b12..2e53e98 100644 --- a/lib/check-dependencies.js +++ b/lib/check-dependencies.js @@ -101,7 +101,7 @@ function checkDependenciesHelper(syncOrAsync, config, callback) { pkgManagerPath = findup('node_modules/bower/bin/bower'); } - depsDir = options.packageDir + '/' + depsDirName; + depsDir = (options.depsDir || options.packageDir) + '/' + depsDirName; // Make sure each package from `scopeList` is present and matches the specified version range. // Packages from `optionalScopeList` may not be present but if they are, they are required