This commit is contained in:
Philipp Kunz 2017-08-02 13:10:30 +02:00
parent 3beff3320c
commit ef3ca28a66
8 changed files with 24 additions and 12 deletions

12
dist/smartfile.fs.js vendored

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@ export interface IToFsOptions {
respectRelative?: boolean; respectRelative?: boolean;
} }
/** /**
* writes string or vinyl file to disk. * writes string or Smartfile to disk.
* @param fileArg * @param fileArg
* @param fileNameArg * @param fileNameArg
* @param fileBaseArg * @param fileBaseArg

View File

@ -23,7 +23,7 @@ exports.toObject = function (fileStringArg, fileTypeArg) {
return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg); return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg);
}; };
/** /**
* writes string or vinyl file to disk. * writes string or Smartfile to disk.
* @param fileArg * @param fileArg
* @param fileNameArg * @param fileNameArg
* @param fileBaseArg * @param fileBaseArg

View File

@ -36,7 +36,6 @@
"smartq": "^1.1.6", "smartq": "^1.1.6",
"smartrequest": "^1.0.6", "smartrequest": "^1.0.6",
"typings-global": "^1.0.20", "typings-global": "^1.0.20",
"vinyl": "^2.1.0",
"vinyl-file": "^3.0.0" "vinyl-file": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -224,9 +224,14 @@ export let fileTreeToObject = async (dirPathArg: string, miniMatchFilter: string
let fileTree = await listFileTree(dirPath, miniMatchFilter) let fileTree = await listFileTree(dirPath, miniMatchFilter)
let smartfileArray: Smartfile[] = [] let smartfileArray: Smartfile[] = []
for (let filePath of fileTree) { for (let filePath of fileTree) {
let fileContentString = toStringSync( let readPath = ((): string => {
plugins.path.join(dirPath, filePath) if (!plugins.path.isAbsolute(filePath)) {
) return plugins.path.join(dirPath, filePath)
} else {
return readPath
}
})()
let fileContentString = toStringSync(readPath)
// push a read file as Smartfile // push a read file as Smartfile
smartfileArray.push(new Smartfile({ smartfileArray.push(new Smartfile({

View File

@ -22,7 +22,7 @@ export interface IToFsOptions {
} }
/** /**
* writes string or vinyl file to disk. * writes string or Smartfile to disk.
* @param fileArg * @param fileArg
* @param fileNameArg * @param fileNameArg
* @param fileBaseArg * @param fileBaseArg

View File

@ -576,7 +576,7 @@ vinyl-file@^3.0.0:
strip-bom-stream "^2.0.0" strip-bom-stream "^2.0.0"
vinyl "^2.0.1" vinyl "^2.0.1"
vinyl@^2.0.1, vinyl@^2.1.0: vinyl@^2.0.1:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
dependencies: dependencies: