fs.js 728 B

123456789101112131415161718192021222324
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var path = require("path");
  4. var 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. stat.path = pattern;
  19. stat.depth = pattern.split('/').length;
  20. return stat;
  21. };
  22. return FileSystem;
  23. }());
  24. exports.default = FileSystem;