Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
897a46e12d | |||
64219f8f09 | |||
42c6c1eec5 | |||
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
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartfile",
|
"name": "smartfile",
|
||||||
"version": "4.2.18",
|
"version": "4.2.20",
|
||||||
"description": "offers smart ways to work with files in nodejs",
|
"description": "offers smart ways to work with files in nodejs",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -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 filePath
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
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:
|
||||||
|
Reference in New Issue
Block a user