-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathfind-cache-dir.node.txt
18 lines (14 loc) · 1.15 KB
/
find-cache-dir.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
┏━━━━━━━━━━━━━━━━━━━━┓
┃ FIND-CACHE-DIR ┃
┗━━━━━━━━━━━━━━━━━━━━┛
ALTERNATIVES ==> #See node-cachedir
VERSION ==> #5.0.0
FIND-CACHE-DIR([OPTS])[->'PATH'] #Returns a convention where to store package-specific cache, used e.g. by ava, istanbul, babel:
# - if ENVVAR CACHE_DIR defined (and not true|false|1|0): CACHE_DIR/${OPTS.name}
# - otherwise: LPREFIX/node_modules/.cache/${OPTS.name}
#Uses PKG-DIR.sync() and MAKE-DIR.sync().
#OPTS:
# - cwd (def: process.cwd())
# - files 'PATH'_ARR: use common directory of those files as cwd instead
# - create BOOL (def: false): create directory if does not exist
#Returns undefined if cannot find, e.g. wrong permissions