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;
|
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
|
||||||
|
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);
|
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
|
||||||
|
@ -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": {
|
||||||
|
@ -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({
|
||||||
|
@ -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
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user