@bacons/apple-targets 0.1.1 → 0.1.2
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.
- package/README.md +5 -1
- package/build/config.d.ts +5 -0
- package/build/withWidget.js +9 -6
- package/package.json +3 -2
- package/prebuild-blank.tgz +0 -0
package/README.md
CHANGED
|
@@ -69,7 +69,11 @@ This file can have the following properties:
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
// The iOS version fot the target.
|
|
72
|
-
"deploymentTarget": "13.4"
|
|
72
|
+
"deploymentTarget": "13.4",
|
|
73
|
+
|
|
74
|
+
// Optional bundle identifier for the target. Will default to a sanitized version of the root project bundle id + target name.
|
|
75
|
+
// If the specified bundle identifier is prefixed with a dot (.), the bundle identifier will be appended to the main app's bundle identifier.
|
|
76
|
+
"bundleIdentifier": ".mywidget"
|
|
73
77
|
}
|
|
74
78
|
```
|
|
75
79
|
|
package/build/config.d.ts
CHANGED
|
@@ -68,6 +68,11 @@ export type Config = {
|
|
|
68
68
|
type: ExtensionType;
|
|
69
69
|
/** Name of the target. Will default to a sanitized version of the directory name. */
|
|
70
70
|
name?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Bundle identifier for the target. Will default to a sanitized version of the root project + name.
|
|
73
|
+
* If the specified bundle identifier is prefixed with a dot (.), the bundle identifier will be appended to the main app's bundle identifier.
|
|
74
|
+
**/
|
|
75
|
+
bundleIdentifier?: string;
|
|
71
76
|
/**
|
|
72
77
|
* A local file path or URL to an image asset.
|
|
73
78
|
* @example "./assets/icon.png"
|
package/build/withWidget.js
CHANGED
|
@@ -22,7 +22,7 @@ function kebabToCamelCase(str) {
|
|
|
22
22
|
}
|
|
23
23
|
const withWidget = (config, props) => {
|
|
24
24
|
// TODO: Magically based on the top-level folders in the `ios-widgets/` folder
|
|
25
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
26
26
|
if (props.icon && !/https?:\/\//.test(props.icon)) {
|
|
27
27
|
props.icon = path_1.default.join(props.directory, props.icon);
|
|
28
28
|
}
|
|
@@ -111,22 +111,25 @@ const withWidget = (config, props) => {
|
|
|
111
111
|
},
|
|
112
112
|
]);
|
|
113
113
|
const targetName = (_c = props.name) !== null && _c !== void 0 ? _c : widget;
|
|
114
|
-
const
|
|
114
|
+
const mainAppBundleId = config.ios.bundleIdentifier;
|
|
115
|
+
const bundleId = ((_d = props.bundleIdentifier) === null || _d === void 0 ? void 0 : _d.startsWith("."))
|
|
116
|
+
? mainAppBundleId + props.bundleIdentifier
|
|
117
|
+
: (_e = props.bundleIdentifier) !== null && _e !== void 0 ? _e : `${mainAppBundleId}.${targetName}`;
|
|
115
118
|
(0, withXcodeChanges_1.withXcodeChanges)(config, {
|
|
116
119
|
configPath: props.configPath,
|
|
117
120
|
name: targetName,
|
|
118
121
|
cwd: "../" +
|
|
119
122
|
path_1.default.relative(config._internal.projectRoot, path_1.default.resolve(props.directory)),
|
|
120
|
-
deploymentTarget: (
|
|
123
|
+
deploymentTarget: (_f = props.deploymentTarget) !== null && _f !== void 0 ? _f : "16.4",
|
|
121
124
|
bundleId,
|
|
122
125
|
icon: props.icon,
|
|
123
|
-
hasAccentColor: !!((
|
|
126
|
+
hasAccentColor: !!((_g = props.colors) === null || _g === void 0 ? void 0 : _g.$accent),
|
|
124
127
|
// @ts-expect-error: who cares
|
|
125
|
-
currentProjectVersion: ((
|
|
128
|
+
currentProjectVersion: ((_h = config.ios) === null || _h === void 0 ? void 0 : _h.buildNumber) || 1,
|
|
126
129
|
frameworks: (0, target_1.getFrameworksForType)(props.type).concat(props.frameworks || []),
|
|
127
130
|
type: props.type,
|
|
128
131
|
teamId: props.appleTeamId,
|
|
129
|
-
exportJs: (
|
|
132
|
+
exportJs: (_j = props.exportJs) !== null && _j !== void 0 ? _j :
|
|
130
133
|
// Assume App Clips are used for React Native.
|
|
131
134
|
props.type === "clip",
|
|
132
135
|
});
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bacons/apple-targets",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Generate Apple Targets with Expo Prebuild",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"app.plugin.js",
|
|
8
|
-
"build"
|
|
8
|
+
"build",
|
|
9
|
+
"prebuild-blank.tgz"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"build": "expo-module build",
|
|
Binary file
|