0.0.1 • Published 10 years ago

npm-cache-lock v0.0.1

Weekly downloads
3
License
BSD-2-Clause
Repository
github
Last release
10 years ago

Build Status

npm-cache-lock

Creaing lockfiles for npm - and if there is no cache dir present, create one.

API

.lockFileName(cacheDir, log, u)

Returns the absolute path for a lockfile

.lock(cacheDir, log, u, opts, cb)

Creates a cache-directory if it does not exist. Creates a lockfile and saves the path and status in an Object.

.unlock(cacheDir, log, u, cb)

Async removal of the lockfile from the cache-directory. Throws if file wasn't locked before.