Replace trim-right with _.trimEnd (#3502)
This commit is contained in:
parent
829d4497c9
commit
9f8cd91605
@ -10,7 +10,6 @@
|
|||||||
"babel-runtime": "^6.0.0",
|
"babel-runtime": "^6.0.0",
|
||||||
"lodash": "^4.2.0",
|
"lodash": "^4.2.0",
|
||||||
"path-exists": "^1.0.0",
|
"path-exists": "^1.0.0",
|
||||||
"trim-right": "^1.0.1",
|
|
||||||
"try-resolve": "^1.0.0"
|
"try-resolve": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import pathExists from "path-exists";
|
import pathExists from "path-exists";
|
||||||
import trimRight from "trim-right";
|
|
||||||
import resolve from "try-resolve";
|
import resolve from "try-resolve";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
@ -164,7 +163,7 @@ export function multiple(entryLoc, ignore?: Array<string>) {
|
|||||||
|
|
||||||
export function readFile(filename) {
|
export function readFile(filename) {
|
||||||
if (pathExists.sync(filename)) {
|
if (pathExists.sync(filename)) {
|
||||||
let file = trimRight(fs.readFileSync(filename, "utf8"));
|
let file = _.trimEnd(fs.readFileSync(filename, "utf8"));
|
||||||
file = file.replace(/\r\n/g, "\n");
|
file = file.replace(/\r\n/g, "\n");
|
||||||
return file;
|
return file;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user