UNPKG

727 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var path = require("path");
4var FileSystem = /** @class */ (function () {
5 function FileSystem(options) {
6 this.options = options;
7 }
8 /**
9 * Return full path to entry.
10 */
11 FileSystem.prototype.getFullEntryPath = function (filepath) {
12 return path.resolve(this.options.cwd, filepath);
13 };
14 /**
15 * Return an implementation of the Entry interface.
16 */
17 FileSystem.prototype.makeEntry = function (stat, pattern) {
18 return Object.assign(stat, {
19 path: pattern,
20 depth: pattern.split('/').length
21 });
22 };
23 return FileSystem;
24}());
25exports.default = FileSystem;