expo-pod-pinner
Version:
The Pod Pinner plugin allows you to modify your Podfile in a managed workflow.
43 lines (42 loc) • 1.81 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.withPodPinnerIos = void 0;
const config_plugins_1 = require("@expo/config-plugins");
const path = __importStar(require("path"));
const updatePodfile_1 = require("../support/updatePodfile");
const PodPinnerLog_1 = require("../support/PodPinnerLog");
const withPodPinnerPodfile = (config, props) => {
return (0, config_plugins_1.withDangerousMod)(config, [
'ios',
async (config) => {
const iosRoot = path.join(config.modRequest.projectRoot, "ios");
// Pass props to updatePodfile
await (0, updatePodfile_1.updatePodfile)(iosRoot, props).catch(err => { PodPinnerLog_1.PodPinnerLog.error(err); });
return config;
},
]);
};
const withPodPinnerIos = (config, props) => {
config = withPodPinnerPodfile(config, props);
return config;
};
exports.withPodPinnerIos = withPodPinnerIos;