UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

39 lines (31 loc) 880 B
var assign = require('./util/assign') var fse = {} var gfs = require('graceful-fs') // attach fs methods to fse Object.keys(gfs).forEach(function (key) { fse[key] = gfs[key] }) var fs = fse assign(fs, require('./copy')) assign(fs, require('./copy-sync')) assign(fs, require('./mkdirs')) assign(fs, require('./remove')) assign(fs, require('./json')) assign(fs, require('./move')) assign(fs, require('./empty')) assign(fs, require('./ensure')) assign(fs, require('./output')) assign(fs, require('./walk')) assign(fs, require('./walk-sync')) module.exports = fs // maintain backwards compatibility for awhile var jsonfile = {} Object.defineProperty(jsonfile, 'spaces', { get: function () { return fs.spaces // found in ./json }, set: function (val) { fs.spaces = val } }) module.exports.jsonfile = jsonfile // so users of fs-extra can modify jsonFile.spaces