Comparing version 0.3.10 to 0.4.0
{ | ||
"name": "fs-utils", | ||
"version": "0.3.9", | ||
"version": "0.4.0", | ||
"main": [ | ||
@@ -5,0 +5,0 @@ "index.js" |
34
index.js
@@ -8,20 +8,14 @@ /** | ||
const fs = require('graceful-fs'); | ||
const os = require('os'); | ||
const path = require('path'); | ||
const fs = require('graceful-fs'); | ||
const os = require('os'); | ||
const path = require('path'); | ||
const async = require('async'); | ||
const glob = require('globule'); | ||
const rimraf = require('rimraf'); | ||
const YAML = require('js-yaml'); | ||
const _ = require('lodash'); | ||
const file = module.exports = {}; | ||
// node_modules | ||
const async = require('async'); | ||
const glob = require('globule'); | ||
const rimraf = require('rimraf'); | ||
const YAML = require('js-yaml'); | ||
const template = require('template'); | ||
const _ = require('lodash'); | ||
// Export the `file` object | ||
var file = module.exports = {}; | ||
/** | ||
@@ -578,10 +572,5 @@ * Utils | ||
// Copy files synchronously and process any templates within | ||
// Copy files synchronously | ||
file.copyFileSync = function (src, dest, options) { | ||
var opts = _.extend({}, {process: true}, options || {}); | ||
src = file.readFileSync(src); | ||
if(opts.process === true) { | ||
src = template.process(src, opts.data, opts); | ||
} | ||
file.writeFileSync(dest, src, opts); | ||
file.writeFileSync(dest, file.readFileSync(src), options || {}); | ||
}; | ||
@@ -591,2 +580,3 @@ | ||
/** | ||
@@ -593,0 +583,0 @@ * Remove directories |
{ | ||
"name": "fs-utils", | ||
"version": "0.3.10", | ||
"version": "0.4.0", | ||
"description": "File system extras and utilities to extend the Node.js fs module.", | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"dependencies": { | ||
"async": "~0.2.10", | ||
"async": "~0.6.2", | ||
"globule": "~0.2.0", | ||
@@ -33,4 +33,3 @@ "graceful-fs": "~2.0.3", | ||
"mkdirp": "~0.3.5", | ||
"rimraf": "~2.2.6", | ||
"template": "~0.1.5" | ||
"rimraf": "~2.2.6" | ||
}, | ||
@@ -37,0 +36,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7
53810
1504
- Removedtemplate@~0.1.5
- Removedasync@0.2.10(transitive)
- Removeddelims@0.1.4(transitive)
- Removedfs-utils@0.4.3(transitive)
- Removedtemplate@0.1.8(transitive)
- Removedunderscore.string@2.3.3(transitive)
Updatedasync@~0.6.2