update smartfile relative path handling
This commit is contained in:
parent
8e19586e47
commit
46b1151201
1
dist/smartfile.classes.smartfile.d.ts
vendored
1
dist/smartfile.classes.smartfile.d.ts
vendored
@ -66,4 +66,5 @@ export declare class Smartfile {
|
|||||||
isBuffer(): boolean;
|
isBuffer(): boolean;
|
||||||
isDirectory(): boolean;
|
isDirectory(): boolean;
|
||||||
isStream(): boolean;
|
isStream(): boolean;
|
||||||
|
isSymbolic(): boolean;
|
||||||
}
|
}
|
||||||
|
8
dist/smartfile.classes.smartfile.js
vendored
8
dist/smartfile.classes.smartfile.js
vendored
@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const plugins = require("./smartfile.plugins");
|
||||||
/**
|
/**
|
||||||
* class Smartfile
|
* class Smartfile
|
||||||
* -> is vinyl file compatible
|
* -> is vinyl file compatible
|
||||||
@ -73,7 +74,7 @@ class Smartfile {
|
|||||||
* return relative path of file
|
* return relative path of file
|
||||||
*/
|
*/
|
||||||
get relative() {
|
get relative() {
|
||||||
return this.path;
|
return plugins.path.relative(this.base, this.path);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* return truw when the file has content
|
* return truw when the file has content
|
||||||
@ -99,6 +100,9 @@ class Smartfile {
|
|||||||
isStream() {
|
isStream() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
isSymbolic() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.Smartfile = Smartfile;
|
exports.Smartfile = Smartfile;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLm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||||||
get relative (): string {
|
get relative (): string {
|
||||||
return this.path
|
return plugins.path.relative(this.base, this.path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -124,4 +124,8 @@ export class Smartfile {
|
|||||||
isStream () {
|
isStream () {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isSymbolic () {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user