UNPKG

nx-mesh

Version:
16 lines 711 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSourceFile = void 0; const tslib_1 = require("tslib"); const promises_1 = require("node:fs/promises"); const node_path_1 = require("node:path"); const getSourceFile = (props) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { const { root, dir, sourcePath } = Object.assign({ sourcePath: '.mesh/index.ts', }, props); const dirPath = (0, node_path_1.resolve)(root, dir); const sourceFilePath = (0, node_path_1.join)(dirPath, sourcePath); return yield (0, promises_1.readFile)(sourceFilePath, 'utf8'); }); exports.getSourceFile = getSourceFile; //# sourceMappingURL=get-source-file.js.map