fix #4
This commit is contained in:
parent
3beff3320c
commit
ef3ca28a66
12
dist/smartfile.fs.js
vendored
12
dist/smartfile.fs.js
vendored
File diff suppressed because one or more lines are too long
2
dist/smartfile.memory.d.ts
vendored
2
dist/smartfile.memory.d.ts
vendored
@ -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
|
||||
|
2
dist/smartfile.memory.js
vendored
2
dist/smartfile.memory.js
vendored
@ -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
|
||||
|
@ -11,4 +11,4 @@
|
||||
"npmts"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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": {
|
||||
|
@ -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({
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user