Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/austingebauer/devise.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/resolve/readme.markdown')
-rw-r--r--node_modules/resolve/readme.markdown23
1 files changed, 21 insertions, 2 deletions
diff --git a/node_modules/resolve/readme.markdown b/node_modules/resolve/readme.markdown
index f1b2706..60c20d9 100644
--- a/node_modules/resolve/readme.markdown
+++ b/node_modules/resolve/readme.markdown
@@ -5,7 +5,7 @@ algorithm](https://nodejs.org/api/modules.html#modules_all_together)
such that you can `require.resolve()` on behalf of a file asynchronously and
synchronously
-[![build status](https://secure.travis-ci.org/browserify/node-resolve.png)](http://travis-ci.org/browserify/node-resolve)
+[![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve)
# example
@@ -61,9 +61,10 @@ options are:
* opts.isDirectory - function to asynchronously test whether a directory exists
-* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json contents before looking at the "main" field
+* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
* pkg - package data
* pkgfile - path to package.json
+ * dir - directory for package.json
* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
* pkg - package data
@@ -79,6 +80,12 @@ options are:
* getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
* opts - the resolution options
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
@@ -146,6 +153,18 @@ options are:
* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.