removeProjectFromLibraries.js 767 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = removeProjectFromLibraries;
  6. /**
  7. * Copyright (c) Facebook, Inc. and its affiliates.
  8. *
  9. * This source code is licensed under the MIT license found in the
  10. * LICENSE file in the root directory of this source tree.
  11. */
  12. /**
  13. * Given an array of xcodeproj libraries and pbxFile,
  14. * it removes it from that group by comparing basenames
  15. *
  16. * Important: That function mutates `libraries` and it's not pure.
  17. * It's mainly due to limitations of `xcode` library.
  18. */
  19. function removeProjectFromLibraries(libraries, file) {
  20. libraries.children = libraries.children.filter(library => library.comment !== file.basename);
  21. }
  22. //# sourceMappingURL=removeProjectFromLibraries.js.map