UNPKG

react-native-legal

Version:
18 lines (17 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config_plugins_1 = require("expo/config-plugins"); const common_1 = require("../../plugin-utils/build/common"); const withAndroidLegal_1 = require("./android/withAndroidLegal"); const withIosLegal_1 = require("./ios/withIosLegal"); // eslint-disable-next-line import/no-extraneous-dependencies const pak = require('react-native-legal/package.json'); const withReactNativeLegal = (config, options) => { const { devDepsMode = 'none', includeOptionalDeps = true, transitiveDepsMode = 'all' } = options ?? {}; const pluginScanOptions = { devDepsMode, includeOptionalDeps, transitiveDepsMode }; const scanOptionsFactory = (0, common_1.createPluginScanOptionsFactory)(pluginScanOptions); config = (0, withAndroidLegal_1.withAndroidLegal)(config, { scanOptionsFactory }); config = (0, withIosLegal_1.withIosLegal)(config, { scanOptionsFactory }); return config; }; exports.default = (0, config_plugins_1.createRunOncePlugin)(withReactNativeLegal, pak.name, pak.version);