getHeadersInFolder.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = getHeadersInFolder;
  6. function _glob() {
  7. const data = _interopRequireDefault(require("glob"));
  8. _glob = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. function _path() {
  14. const data = _interopRequireDefault(require("path"));
  15. _path = function () {
  16. return data;
  17. };
  18. return data;
  19. }
  20. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  21. /**
  22. * Copyright (c) Facebook, Inc. and its affiliates.
  23. *
  24. * This source code is licensed under the MIT license found in the
  25. * LICENSE file in the root directory of this source tree.
  26. *
  27. */
  28. const GLOB_EXCLUDE_PATTERN = ['node_modules/**', 'Pods/**', 'Examples/**', 'examples/**'];
  29. /**
  30. * Given folder, it returns an array of all header files
  31. * inside it, ignoring node_modules and examples
  32. */
  33. function getHeadersInFolder(folder) {
  34. return _glob().default.sync('**/*.h', {
  35. cwd: folder,
  36. nodir: true,
  37. ignore: GLOB_EXCLUDE_PATTERN
  38. }).map(file => _path().default.join(folder, file));
  39. }
  40. //# sourceMappingURL=getHeadersInFolder.js.map