-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.js
54 lines (45 loc) · 1.34 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
var xtend = require('xtend')
var fs = require('fs')
var lib = require('./lib')
module.exports = {
readFile: readFile,
readFileSync: readFileSync,
readFiles: readFiles,
readFilesSync: readFilesSync,
readPage: readPage,
readPageSync: readPageSync,
readSite: readSite,
readSiteSync: readSiteSync
}
function readFile (pathFile, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readFile(pathFile, opts, callback)
}
function readFileSync (pathFile, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readFileSync(pathFile, opts)
}
function readFiles (files, pathSite, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readFiles(files, pathSite, opts, callback)
}
function readFilesSync (pathFile, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readFilesSync(pathFile, opts)
}
function readPage (pathPage, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readPage(pathPage, opts, callback)
}
function readPageSync (pathPage, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readPageSync(pathPage, opts)
}
function readSite (pathSite, opts, callback) {
opts = xtend({ fs: fs }, opts)
return lib.readSite(pathSite, opts, callback)
}
function readSiteSync (pathSite, opts, callback) {
opts = xtend(opts, { fs: fs })
return lib.readSiteSync(pathSite, opts)
}