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;
}
/**
* writes string or vinyl file to disk.
* writes string or Smartfile to disk.
* @param fileArg
* @param fileNameArg
* @param fileBaseArg

View File

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

View File

@ -11,4 +11,4 @@
"npmts"
]
}
}
}

View File

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

View File

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

View File

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

View File

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