get-file-content.js 549 B

123456789101112131415
  1. "use strict";
  2. /**
  3. * Use of this source code is governed by an MIT-style license that can be
  4. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  5. */
  6. Object.defineProperty(exports, "__esModule", { value: true });
  7. exports.getFileContent = getFileContent;
  8. function getFileContent(tree, path) {
  9. const fileEntry = tree.get(path);
  10. if (!fileEntry) {
  11. throw new Error(`The file (${path}) does not exist.`);
  12. }
  13. return fileEntry.content.toString();
  14. }
  15. //# sourceMappingURL=get-file-content.js.map