@bacons/apple-targets 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withPodTargetExtension = void 0;
|
|
4
|
-
const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
|
|
5
4
|
const config_plugins_1 = require("expo/config-plugins");
|
|
6
5
|
// TODO: This won't always match the correct target name. Need to pull the same algo in.
|
|
7
|
-
const extension = `# Dynamic loading of target configurations
|
|
6
|
+
const extension = `# apple-targets-extension-loader -- Dynamic loading of target configurations
|
|
8
7
|
Dir.glob(File.join(__dir__, '..', 'targets', '**', 'pods.rb')).each do |target_file|
|
|
9
8
|
target_name = File.basename(File.dirname(target_file))
|
|
10
9
|
target target_name do
|
|
@@ -20,15 +19,10 @@ end
|
|
|
20
19
|
`;
|
|
21
20
|
/** Inject a helper which matches `pods.rb` files in the target root directory and invokes it as a way to extend the Podfile. */
|
|
22
21
|
const withPodTargetExtension = (config) => (0, config_plugins_1.withPodfile)(config, (config) => {
|
|
23
|
-
config.modResults.contents
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// Add at the end of the file.
|
|
28
|
-
anchor: /Pod::UI\.warn e/,
|
|
29
|
-
offset: 4,
|
|
30
|
-
comment: "#",
|
|
31
|
-
}).contents;
|
|
22
|
+
if (config.modResults.contents.includes("apple-targets-extension-loader")) {
|
|
23
|
+
return config;
|
|
24
|
+
}
|
|
25
|
+
config.modResults.contents += "\n\n" + extension;
|
|
32
26
|
return config;
|
|
33
27
|
});
|
|
34
28
|
exports.withPodTargetExtension = withPodTargetExtension;
|