Comparing version 4.0.0 to 5.0.0
'use strict' | ||
var fs = require('fs') | ||
var path = require('path') | ||
var vfile = require('./core') | ||
@@ -29,3 +30,3 @@ | ||
function executor(resolve, reject) { | ||
fs.readFile(file.path, options, done) | ||
fs.readFile(path.resolve(file.cwd, file.path), options, done) | ||
@@ -51,3 +52,3 @@ function done(err, res) { | ||
var file = vfile(description) | ||
file.contents = fs.readFileSync(file.path, options) | ||
file.contents = fs.readFileSync(path.resolve(file.cwd, file.path), options) | ||
return file | ||
@@ -73,3 +74,8 @@ } | ||
function executor(resolve, reject) { | ||
fs.writeFile(file.path, file.contents || '', options, done) | ||
fs.writeFile( | ||
path.resolve(file.cwd, file.path), | ||
file.contents || '', | ||
options, | ||
done | ||
) | ||
@@ -91,3 +97,7 @@ function done(err) { | ||
var file = vfile(description) | ||
fs.writeFileSync(file.path, file.contents || '', options) | ||
fs.writeFileSync( | ||
path.resolve(file.cwd, file.path), | ||
file.contents || '', | ||
options | ||
) | ||
} |
{ | ||
"name": "to-vfile", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Create a vfile from a file-path", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
8876
97