Fixed path event dir property
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,6 +10,7 @@ uploads
|
|||||||
public/momentum*js
|
public/momentum*js
|
||||||
junit.xml
|
junit.xml
|
||||||
/docs/
|
/docs/
|
||||||
|
main.mjs
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
6927
package-lock.json
generated
Normal file
6927
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/utils",
|
"name": "@ztimson/utils",
|
||||||
"version": "0.29.4",
|
"version": "0.29.5",
|
||||||
"description": "Utility library",
|
"description": "Utility library",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export class PathEvent {
|
|||||||
let temp = p.split('/').filter(p => !!p);
|
let temp = p.split('/').filter(p => !!p);
|
||||||
this.module = temp.splice(0, 1)[0] || '';
|
this.module = temp.splice(0, 1)[0] || '';
|
||||||
this.path = temp.join('/');
|
this.path = temp.join('/');
|
||||||
this.dir = temp.length > 2 ? temp.slice(0, -1).join('/') : '';
|
this.dir = temp.length > 1 ? temp.slice(0, -1).join('/') : '';
|
||||||
this.fullPath = `${this.module}${this.module && this.path ? '/' : ''}${this.path}`;
|
this.fullPath = `${this.module}${this.module && this.path ? '/' : ''}${this.path}`;
|
||||||
this.name = temp.pop() || '';
|
this.name = temp.pop() || '';
|
||||||
this.hasGlob = this.fullPath.includes('*');
|
this.hasGlob = this.fullPath.includes('*');
|
||||||
|
|||||||
Reference in New Issue
Block a user