aboutsummaryrefslogtreecommitdiff
path: root/node_modules/find-cache-dir/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/find-cache-dir/readme.md')
-rw-r--r--node_modules/find-cache-dir/readme.md47
1 files changed, 26 insertions, 21 deletions
diff --git a/node_modules/find-cache-dir/readme.md b/node_modules/find-cache-dir/readme.md
index d0b71b19f..447d62020 100644
--- a/node_modules/find-cache-dir/readme.md
+++ b/node_modules/find-cache-dir/readme.md
@@ -1,8 +1,8 @@
-# find-cache-dir [![Build Status](https://travis-ci.org/jamestalmage/find-cache-dir.svg?branch=master)](https://travis-ci.org/jamestalmage/find-cache-dir) [![Coverage Status](https://coveralls.io/repos/jamestalmage/find-cache-dir/badge.svg?branch=master&service=github)](https://coveralls.io/github/jamestalmage/find-cache-dir?branch=master)
+# find-cache-dir [![Build Status](https://travis-ci.org/avajs/find-cache-dir.svg?branch=master)](https://travis-ci.org/avajs/find-cache-dir) [![Coverage Status](https://coveralls.io/repos/github/avajs/find-cache-dir/badge.svg?branch=master)](https://coveralls.io/github/avajs/find-cache-dir?branch=master)
-> Finds the common standard cache directory.
+> Finds the common standard cache directory
-Recently the [`nyc`](https://www.npmjs.com/package/nyc) and [`AVA`](https://www.npmjs.com/package/ava) projects decided to standardize on a common directory structure for storing cache information:
+Recently the [`nyc`](https://github.com/bcoe/nyc) and [`AVA`](https://ava.li) projects decided to standardize on a common directory structure for storing cache information:
```sh
# nyc
@@ -16,12 +16,12 @@ Recently the [`nyc`](https://www.npmjs.com/package/nyc) and [`AVA`](https://www.
```
This module makes it easy to correctly locate the cache directory according to this shared spec. If this pattern becomes ubiquitous, clearing the cache for multiple dependencies becomes easy and consistent:
-
+
```
rm -rf ./node_modules/.cache
```
-If you decide to adopt this pattern, please file a PR adding your name to the list of adopters below.
+If you decide to adopt this pattern, please file a PR adding your name to the list of adopters below.
## Install
@@ -37,7 +37,7 @@ $ npm install --save find-cache-dir
const findCacheDir = require('find-cache-dir');
findCacheDir({name: 'unicorns'});
-//=> /user/path/node-modules/.cache/unicorns
+//=> '/user/path/node-modules/.cache/unicorns'
```
@@ -45,40 +45,40 @@ findCacheDir({name: 'unicorns'});
### findCacheDir([options])
-Finds the cache dir using the supplied options. The algorithm tries to find a `package.json` file, searching every parent directory of the `cwd` specified (or implied from other options). It returns a `string` containing the absolute path to the cache directory, or `null` if `package.json` was never found.
+Finds the cache directory using the supplied options. The algorithm tries to find a `package.json` file, searching every parent directory of the `cwd` specified (or implied from other options). It returns a `string` containing the absolute path to the cache directory, or `null` if `package.json` was never found.
#### options
##### name
-*Required*
-Type: `string`
+*Required*<br>
+Type: `string`
-This should be the same as your project name in `package.json`.
+Should be the same as your project name in `package.json`.
##### files
-Type: `array` of `string`
+Type: `Array` `string
An array of files that will be searched for a common parent directory. This common parent directory will be used in lieu of the `cwd` option below.
##### cwd
-Type: `string`
+Type: `string`<br>
Default `process.cwd()`
-The directory to start searching for a `package.json` from.
+Directory to start searching for a `package.json` from.
##### create
-Type: `boolean`
+Type: `boolean`<br>
Default `false`
If `true`, the directory will be created synchronously before returning.
##### thunk
-Type: `boolean`
+Type: `boolean`<br>
Default `false`
If `true`, this modifies the return type to be a function that is a thunk for `path.join(theFoundCacheDirectory)`.
@@ -87,22 +87,27 @@ If `true`, this modifies the return type to be a function that is a thunk for `p
const thunk = findCacheDir({name: 'foo', thunk: true});
thunk();
-//=> /some/path/node_modules/.cache/foo
+//=> '/some/path/node_modules/.cache/foo'
thunk('bar.js')
-//=> /some/path/node_modules/.cache/foo/bar.js
+//=> '/some/path/node_modules/.cache/foo/bar.js'
thunk('baz', 'quz.js')
-//=> /some/path/node_modules/.cache/foo/baz/quz.js
+//=> '/some/path/node_modules/.cache/foo/baz/quz.js'
```
This is helpful for actually putting actual files in the cache!
+
## Adopters
-- [`NYC`](https://www.npmjs.com/package/nyc)
-- [`AVA`](https://www.npmjs.com/package/ava)
+- [`AVA`](https://ava.li)
+- [`nyc`](https://github.com/bcoe/nyc)
+- [`babel-loader`](https://github.com/babel/babel-loader)
+- [`eslint-loader`](https://github.com/MoOx/eslint-loader)
+- [`Phenomic`](https://phenomic.io)
+
## License
-MIT © [James Talmage](http://github.com/jamestalmage)
+MIT © [James Talmage](https://github.com/jamestalmage)