2017-02-19 16:37:54 +00:00
|
|
|
var fs = require('fs-extra');
|
2017-02-20 00:44:16 +00:00
|
|
|
var utils = require('./utils.js');
|
2017-02-19 16:37:54 +00:00
|
|
|
|
|
|
|
function mkdirpSync() {
|
|
|
|
return fs.mkdirpSync.apply(fs.mkdirpSync, arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
function copySync() {
|
|
|
|
return fs.copySync.apply(fs.copySync, arguments);
|
|
|
|
}
|
|
|
|
|
2017-02-19 17:51:32 +00:00
|
|
|
function writeFileSync() {
|
|
|
|
return fs.writeFileSync.apply(fs.writeFileSync, arguments);
|
|
|
|
}
|
|
|
|
|
2017-02-19 16:37:54 +00:00
|
|
|
function readFileSync() {
|
|
|
|
return fs.readFileSync.apply(fs.readFileSync, arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
function readJSONSync() {
|
|
|
|
return fs.readJSONSync.apply(fs.readJSONSync, arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
function writeJSONSync() {
|
|
|
|
return fs.writeJSONSync.apply(fs.writeJSONSync, arguments);
|
|
|
|
}
|
|
|
|
|
2017-02-21 20:45:10 +00:00
|
|
|
function existsSync(){
|
|
|
|
return fs.existsSync.apply(fs.existsSync, arguments);
|
|
|
|
}
|
|
|
|
|
2017-02-20 00:44:16 +00:00
|
|
|
// returns embarks root directory
|
|
|
|
function embarkPath(fileOrDir) {
|
|
|
|
return utils.joinPath(__dirname, '/../../', fileOrDir);
|
|
|
|
}
|
|
|
|
|
2017-02-19 16:37:54 +00:00
|
|
|
module.exports = {
|
|
|
|
mkdirpSync: mkdirpSync,
|
|
|
|
copySync: copySync,
|
|
|
|
readFileSync: readFileSync,
|
2017-02-19 17:51:32 +00:00
|
|
|
writeFileSync: writeFileSync,
|
2017-02-19 16:37:54 +00:00
|
|
|
readJSONSync: readJSONSync,
|
2017-02-20 00:44:16 +00:00
|
|
|
writeJSONSync: writeJSONSync,
|
2017-02-21 20:45:10 +00:00
|
|
|
existsSync: existsSync,
|
2017-02-20 00:44:16 +00:00
|
|
|
embarkPath: embarkPath
|
2017-02-19 16:37:54 +00:00
|
|
|
};
|