apply-changes.js 713 B

123456789101112131415161718
  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.applyChangesToFile = applyChangesToFile;
  8. const change_1 = require("@schematics/angular/utility/change");
  9. function applyChangesToFile(host, filePath, changes) {
  10. const recorder = host.beginUpdate(filePath);
  11. changes.forEach((change) => {
  12. if (change instanceof change_1.InsertChange) {
  13. recorder.insertLeft(change.pos, change.toAdd);
  14. }
  15. });
  16. host.commitUpdate(recorder);
  17. }
  18. //# sourceMappingURL=apply-changes.js.map