mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
make fs-ext optional
This commit is contained in:
parent
9404e811a5
commit
752d0f62f0
2 changed files with 13 additions and 2 deletions
|
@ -1,10 +1,19 @@
|
|||
var fs = require('fs')
|
||||
, fsExt = require('fs-ext')
|
||||
, Path = require('path')
|
||||
, mkdirp = require('mkdirp')
|
||||
, mystreams = require('./streams')
|
||||
, FSError = require('./error').FSError
|
||||
|
||||
try {
|
||||
var fsExt = require('fs-ext')
|
||||
} catch(e) {
|
||||
fsExt = {
|
||||
flock: function() {
|
||||
arguments[arguments.length-1]()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function write(dest, data, cb) {
|
||||
var safe_write = function(cb) {
|
||||
var tmpname = dest + '.tmp' + String(Math.random()).substr(2)
|
||||
|
|
|
@ -27,9 +27,11 @@ dependencies:
|
|||
semver: '>= 2.2.1'
|
||||
minimatch: '>= 0.2.14'
|
||||
bunyan: '>= 0.22.1'
|
||||
fs-ext: '>= 0.3.2'
|
||||
mkdirp: '>= 0.3.5'
|
||||
|
||||
optionalDependencies:
|
||||
fs-ext: '>= 0.3.2'
|
||||
|
||||
devDependencies:
|
||||
rimraf: '>= 2.2.5'
|
||||
mocha: '>= 1.17.0'
|
||||
|
|
Loading…
Add table
Reference in a new issue