1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = findPodspec;
|
7 |
|
8 | function _glob() {
|
9 | const data = _interopRequireDefault(require("glob"));
|
10 |
|
11 | _glob = function () {
|
12 | return data;
|
13 | };
|
14 |
|
15 | return data;
|
16 | }
|
17 |
|
18 | function _path() {
|
19 | const data = _interopRequireDefault(require("path"));
|
20 |
|
21 | _path = function () {
|
22 | return data;
|
23 | };
|
24 |
|
25 | return data;
|
26 | }
|
27 |
|
28 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
29 |
|
30 | function findPodspec(folder) {
|
31 | const podspecs = _glob().default.sync('*.podspec', {
|
32 | cwd: folder
|
33 | });
|
34 |
|
35 | if (podspecs.length === 0) {
|
36 | return null;
|
37 | }
|
38 |
|
39 | const packagePodspec = _path().default.basename(folder) + '.podspec';
|
40 | const podspecFile = podspecs.includes(packagePodspec) ? packagePodspec : podspecs[0];
|
41 | return _path().default.join(folder, podspecFile);
|
42 | }
|
43 |
|
44 |
|
\ | No newline at end of file |