UNPKG

resolve-tspaths

Version:

Transform path mappings in your compiled Typescript code

15 lines (14 loc) 378 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applyChanges = applyChanges; const fs_1 = require("fs"); /** * Apply the file changes. * * @param changes The file changes to apply. */ function applyChanges(changes) { changes.forEach(({ file, text }) => { (0, fs_1.writeFileSync)(file, text, { encoding: "utf-8" }); }); }