Skip to content

Commit cbc6a08

Browse files
authored
Merge pull request #37 from SecJS/feat/len-add-no-build
feat: Add no build property to File/Folder
2 parents 8536107 + 510c644 commit cbc6a08

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@secjs/utils",
3-
"version": "1.4.6",
3+
"version": "1.4.7",
44
"description": "",
55
"license": "MIT",
66
"author": "João Lenon",

src/Classes/File.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ export class File {
530530

531531
private static parsePath(filePath: string) {
532532
const { base, dir, root } = parse(
533-
isAbsolute(filePath) ? filePath : Path.pwd(filePath),
533+
isAbsolute(filePath) ? filePath : Path.noBuild().pwd(filePath),
534534
)
535535

536536
const baseArray = base.split('.')

src/Classes/Folder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ export class Folder {
543543
}
544544

545545
private static getSubFiles(folders: Folder[], pattern = null): File[] {
546-
if (pattern) pattern = isAbsolute(pattern) ? pattern : Path.pwd(pattern)
546+
if (pattern) pattern = isAbsolute(pattern) ? pattern : Path.noBuild().pwd(pattern)
547547

548548
const files = []
549549

@@ -569,7 +569,7 @@ export class Folder {
569569
recursive: boolean,
570570
pattern = null,
571571
): Folder[] {
572-
if (pattern) pattern = isAbsolute(pattern) ? pattern : Path.pwd(pattern)
572+
if (pattern) pattern = isAbsolute(pattern) ? pattern : Path.noBuild().pwd(pattern)
573573

574574
const subFolders = []
575575

@@ -609,7 +609,7 @@ export class Folder {
609609

610610
private static parsePath(folderPath: string) {
611611
const { dir, name } = parse(
612-
isAbsolute(folderPath) ? folderPath : Path.pwd(folderPath),
612+
isAbsolute(folderPath) ? folderPath : Path.noBuild().pwd(folderPath),
613613
)
614614

615615
return { dir, name, path: dir + '/' + name }

0 commit comments

Comments
 (0)