@kawalir/extension-node 0.6.5 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Dependencies update
|
|
@@ -5,15 +5,15 @@ import { TextFile } from "./TextFile";
|
|
|
5
5
|
export class Folder {
|
|
6
6
|
constructor(public path: string) {}
|
|
7
7
|
|
|
8
|
-
public getFile = (name: string) => new TextFile(this.getPath(name));
|
|
9
|
-
|
|
10
8
|
public list = () =>
|
|
11
9
|
FileSystem.readdirSync(this.path, {
|
|
12
10
|
recursive: true,
|
|
13
11
|
encoding: "utf8",
|
|
14
12
|
}).map((p) => this.getPath(p));
|
|
15
13
|
|
|
16
|
-
public
|
|
14
|
+
public getTextFile = (name: string) => new TextFile(this.getPath(name));
|
|
15
|
+
|
|
16
|
+
public getFolder = (relativePath: string) =>
|
|
17
17
|
new Folder(this.getPath(relativePath));
|
|
18
18
|
|
|
19
19
|
public getPath = (relative: string) => Path.join(this.path, relative);
|
|
@@ -2,6 +2,8 @@ import { FileFunctions as FF } from "@kawalir/extension-node/Core/Functions";
|
|
|
2
2
|
import { File } from "./File";
|
|
3
3
|
|
|
4
4
|
export class TextFile extends File {
|
|
5
|
+
public writeLines = (lines: string[]) => this.write(lines.join("\n"));
|
|
6
|
+
|
|
5
7
|
public write = (content: string) => FF.File.write(this.path, content);
|
|
6
8
|
|
|
7
9
|
public readOrNull = (): StringOrNull => FF.File.readOrNull(this.path);
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"Node",
|
|
8
8
|
"Node Extension"
|
|
9
9
|
],
|
|
10
|
-
"version": "0.6.
|
|
10
|
+
"version": "0.6.7",
|
|
11
11
|
"author": "Denis Mijatovic",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"type": "commonjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"watch-test": "cd Test && npm start"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@kawalir/extension": "^0.8.
|
|
33
|
+
"@kawalir/extension": "^0.8.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^25.3.0"
|