react-native-persona 1.2.8 → 1.3.0
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/CHANGELOG.md +29 -0
- package/RNPersonaInquiry.podspec +1 -1
- package/android/README.md +14 -0
- package/android/build.gradle +21 -100
- package/lib/commonjs/index.js +477 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/util.js +36 -0
- package/lib/commonjs/util.js.map +1 -0
- package/lib/commonjs/util.spec.js +31 -0
- package/lib/commonjs/util.spec.js.map +1 -0
- package/lib/module/index.js +452 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/util.js +29 -0
- package/lib/module/util.js.map +1 -0
- package/lib/module/util.spec.js +28 -0
- package/lib/module/util.spec.js.map +1 -0
- package/lib/typescript/persona-tools/Config.d.ts +15 -0
- package/lib/typescript/persona-tools/Theme.d.ts +124 -0
- package/lib/typescript/persona-tools/index.d.ts +1 -0
- package/lib/typescript/persona-tools/lib/AndroidResourcePrinter.d.ts +40 -0
- package/lib/typescript/persona-tools/lib/AndroidResourcePrinter.spec.d.ts +1 -0
- package/lib/typescript/persona-tools/lib/prompts.d.ts +8 -0
- package/lib/typescript/persona-tools/tools/AndroidThemeGenerator.d.ts +5 -0
- package/lib/typescript/persona-tools/tools/IosThemeInstructions.d.ts +5 -0
- package/{generatedTypes → lib/typescript/src}/index.d.ts +67 -3
- package/lib/typescript/src/util.d.ts +3 -0
- package/lib/typescript/src/util.spec.d.ts +1 -0
- package/package.json +79 -21
- package/persona-tools/{config.ts → Config.ts} +7 -7
- package/persona-tools/Theme.ts +140 -138
- package/persona-tools/index.ts +9 -9
- package/persona-tools/lib/AndroidResourcePrinter.spec.ts +100 -101
- package/persona-tools/lib/AndroidResourcePrinter.ts +314 -278
- package/persona-tools/lib/prompts.ts +11 -11
- package/persona-tools/tools/AndroidThemeGenerator.ts +31 -32
- package/persona-tools/tools/IosThemeInstructions.ts +8 -8
- package/src/index.ts +17 -18
- package/src/util.spec.ts +14 -8
- package/src/util.ts +3 -3
- package/jest.config.js +0 -10
- package/persona-tools/Theme.js +0 -213
- package/persona-tools/config.js +0 -72
- package/persona-tools/index.js +0 -30
- package/persona-tools/lib/AndroidResourcePrinter.js +0 -832
- package/persona-tools/lib/AndroidResourcePrinter.spec.js +0 -1135
- package/persona-tools/lib/prompts.js +0 -39
- package/persona-tools/tools/AndroidThemeGenerator.js +0 -59
- package/persona-tools/tools/IosThemeInstructions.js +0 -34
- package/src/index.js +0 -307
- package/src/util.js +0 -29
- package/src/util.spec.js +0 -15
- package/tsconfig.json +0 -29
package/persona-tools/Theme.ts
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
import Table from
|
|
2
|
-
import chalk from
|
|
1
|
+
import Table from 'cli-table';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
3
|
|
|
4
|
-
import Config from
|
|
4
|
+
import Config from './Config';
|
|
5
5
|
|
|
6
6
|
const COLOR_REGEX = /^[a-zA-Z0-9]{6}$/;
|
|
7
7
|
|
|
8
8
|
export enum ANDROID_THEME_CONFIG_KEY {
|
|
9
|
-
backgroundColor =
|
|
10
|
-
primaryColor =
|
|
11
|
-
darkPrimaryColor =
|
|
12
|
-
accentColor =
|
|
9
|
+
backgroundColor = 'backgroundColor',
|
|
10
|
+
primaryColor = 'primaryColor',
|
|
11
|
+
darkPrimaryColor = 'darkPrimaryColor',
|
|
12
|
+
accentColor = 'accentColor',
|
|
13
13
|
|
|
14
|
-
titleTextColor =
|
|
15
|
-
titleTextFont =
|
|
16
|
-
titleTextSize =
|
|
14
|
+
titleTextColor = 'titleTextColor',
|
|
15
|
+
titleTextFont = 'titleTextFont',
|
|
16
|
+
titleTextSize = 'titleTextSize',
|
|
17
17
|
|
|
18
|
-
bodyTextColor =
|
|
19
|
-
bodyTextFont =
|
|
20
|
-
bodyTextSize =
|
|
18
|
+
bodyTextColor = 'bodyTextColor',
|
|
19
|
+
bodyTextFont = 'bodyTextFont',
|
|
20
|
+
bodyTextSize = 'bodyTextSize',
|
|
21
21
|
|
|
22
|
-
footnoteTextColor =
|
|
23
|
-
footnoteTextFont =
|
|
22
|
+
footnoteTextColor = 'footnoteTextColor',
|
|
23
|
+
footnoteTextFont = 'footnoteTextFont',
|
|
24
24
|
footnoteTextSize = 'footnoteTextSize',
|
|
25
25
|
|
|
26
|
-
cameraInstructionsTextColor =
|
|
27
|
-
cameraInstructionsTextFont =
|
|
28
|
-
cameraInstructionsTextSize =
|
|
26
|
+
cameraInstructionsTextColor = 'cameraInstructionsTextColor',
|
|
27
|
+
cameraInstructionsTextFont = 'cameraInstructionsTextFont',
|
|
28
|
+
cameraInstructionsTextSize = 'cameraInstructionsTextSize',
|
|
29
29
|
|
|
30
|
-
cameraHintTextColor =
|
|
31
|
-
cameraHintTextFont =
|
|
32
|
-
cameraHintTextSize =
|
|
30
|
+
cameraHintTextColor = 'cameraHintTextColor',
|
|
31
|
+
cameraHintTextFont = 'cameraHintTextFont',
|
|
32
|
+
cameraHintTextSize = 'cameraHintTextSize',
|
|
33
33
|
|
|
34
|
-
cameraGuideHintTextColor =
|
|
35
|
-
cameraGuideHintTextFont =
|
|
36
|
-
cameraGuideHintTextSize =
|
|
34
|
+
cameraGuideHintTextColor = 'cameraGuideHintTextColor',
|
|
35
|
+
cameraGuideHintTextFont = 'cameraGuideHintTextFont',
|
|
36
|
+
cameraGuideHintTextSize = 'cameraGuideHintTextSize',
|
|
37
37
|
|
|
38
38
|
// formLabelTextColor = "formLabelTextColor",
|
|
39
39
|
// formLabelTextFont = "formLabelTextFont",
|
|
40
40
|
|
|
41
|
-
textFieldTextColor =
|
|
42
|
-
textFieldTextFont =
|
|
41
|
+
textFieldTextColor = 'textFieldTextColor',
|
|
42
|
+
textFieldTextFont = 'textFieldTextFont',
|
|
43
43
|
|
|
44
|
-
pickerTextColor =
|
|
45
|
-
pickerTextFont =
|
|
44
|
+
pickerTextColor = 'pickerTextColor',
|
|
45
|
+
pickerTextFont = 'pickerTextFont',
|
|
46
46
|
|
|
47
|
-
buttonBackgroundColor =
|
|
48
|
-
buttonDisabledBackgroundColor =
|
|
49
|
-
buttonTouchedBackgroundColor =
|
|
50
|
-
buttonTextColor =
|
|
51
|
-
buttonDisabledTextColor =
|
|
47
|
+
buttonBackgroundColor = 'buttonBackgroundColor',
|
|
48
|
+
buttonDisabledBackgroundColor = 'buttonDisabledBackgroundColor',
|
|
49
|
+
buttonTouchedBackgroundColor = 'buttonTouchedBackgroundColor',
|
|
50
|
+
buttonTextColor = 'buttonTextColor',
|
|
51
|
+
buttonDisabledTextColor = 'buttonDisabledTextColor',
|
|
52
52
|
// buttonTextAlignment = "buttonTextAlignment",
|
|
53
|
-
buttonCornerRadius =
|
|
54
|
-
buttonFont =
|
|
55
|
-
buttonTextSize =
|
|
56
|
-
progressColor =
|
|
57
|
-
successAsset =
|
|
58
|
-
failAsset =
|
|
59
|
-
loadingAnimationAsset =
|
|
60
|
-
loadingAnimationWidthPercent =
|
|
61
|
-
selfieAnimationAsset =
|
|
62
|
-
selfieAnimationWidthPercent =
|
|
53
|
+
buttonCornerRadius = 'buttonCornerRadius',
|
|
54
|
+
buttonFont = 'buttonFont',
|
|
55
|
+
buttonTextSize = 'buttonTextSize',
|
|
56
|
+
progressColor = 'progressColor',
|
|
57
|
+
successAsset = 'successAsset',
|
|
58
|
+
failAsset = 'failAsset',
|
|
59
|
+
loadingAnimationAsset = 'loadingAnimationAsset',
|
|
60
|
+
loadingAnimationWidthPercent = 'loadingAnimationWidthPercent',
|
|
61
|
+
selfieAnimationAsset = 'selfieAnimationAsset',
|
|
62
|
+
selfieAnimationWidthPercent = 'selfieAnimationWidthPercent',
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export enum IOS_THEME_CONFIG_KEY {
|
|
66
|
-
backgroundColor =
|
|
67
|
-
primaryColor =
|
|
68
|
-
darkPrimaryColor =
|
|
69
|
-
accentColor =
|
|
70
|
-
progressColor =
|
|
71
|
-
overlayBackgroundColor =
|
|
72
|
-
titleTextColor =
|
|
73
|
-
titleTextFont =
|
|
74
|
-
titleTextSize =
|
|
75
|
-
titleTextAlignment =
|
|
76
|
-
bodyTextColor =
|
|
77
|
-
bodyTextFont =
|
|
78
|
-
bodyTextSize =
|
|
79
|
-
bodyTextAlignment =
|
|
80
|
-
footnoteTextColor =
|
|
81
|
-
footnoteTextFont =
|
|
82
|
-
footnoteTextSize =
|
|
83
|
-
formLabelTextColor =
|
|
84
|
-
formLabelTextFont =
|
|
85
|
-
textFieldTextColor =
|
|
86
|
-
textFieldBackgroundColor =
|
|
87
|
-
textFieldBorderColor =
|
|
88
|
-
pickerTextColor =
|
|
89
|
-
pickerTextFont =
|
|
90
|
-
cameraInstructionsTextColor =
|
|
91
|
-
cameraInstructionsTextFont =
|
|
92
|
-
cameraInstructionsTextSize =
|
|
93
|
-
cameraHintTextColor =
|
|
94
|
-
cameraHintTextFont =
|
|
95
|
-
cameraHintTextSize =
|
|
96
|
-
cameraGuideHintTextColor =
|
|
97
|
-
cameraGuideHintTextFont =
|
|
98
|
-
cameraGuideHintTextSize =
|
|
99
|
-
buttonBackgroundColor =
|
|
100
|
-
buttonDisabledBackgroundColor =
|
|
101
|
-
buttonTouchedBackgroundColor =
|
|
102
|
-
buttonImageTintColor =
|
|
103
|
-
buttonImageHidden =
|
|
104
|
-
buttonCornerRadius =
|
|
105
|
-
buttonTextAlignment =
|
|
106
|
-
buttonDisabledTextColor =
|
|
107
|
-
buttonTextColor =
|
|
108
|
-
buttonFont =
|
|
109
|
-
buttonTextSize =
|
|
110
|
-
selectedCellBackgroundColor =
|
|
111
|
-
closeButtonTintColor =
|
|
112
|
-
cancelButtonBackgroundColor =
|
|
113
|
-
cameraButtonBackgroundColor =
|
|
114
|
-
cameraGuideCornersColor =
|
|
115
|
-
successAssetName =
|
|
116
|
-
successAssetWidth =
|
|
117
|
-
successAssetHeight =
|
|
118
|
-
verificationFailAssetName =
|
|
119
|
-
verificationFailAssetWidth =
|
|
120
|
-
verificationFailAssetHeight =
|
|
121
|
-
failAssetName =
|
|
122
|
-
failAssetWidth =
|
|
123
|
-
failAssetHeight =
|
|
124
|
-
loadingAnimationAssetName =
|
|
125
|
-
loadingAnimationAssetWidth =
|
|
126
|
-
loadingAnimationAssetHeight =
|
|
127
|
-
processingAnimationAssetName =
|
|
128
|
-
processingAnimationAssetWidth =
|
|
129
|
-
processingAnimationAssetHeight =
|
|
130
|
-
selfieAnimationAssetName =
|
|
131
|
-
selfieAnimationAssetWidth =
|
|
132
|
-
selfieAnimationAssetHeight =
|
|
66
|
+
backgroundColor = 'backgroundColor',
|
|
67
|
+
primaryColor = 'primaryColor',
|
|
68
|
+
darkPrimaryColor = 'darkPrimaryColor',
|
|
69
|
+
accentColor = 'accentColor',
|
|
70
|
+
progressColor = 'progressColor',
|
|
71
|
+
overlayBackgroundColor = 'overlayBackgroundColor',
|
|
72
|
+
titleTextColor = 'titleTextColor',
|
|
73
|
+
titleTextFont = 'titleTextFont',
|
|
74
|
+
titleTextSize = 'titleTextSize',
|
|
75
|
+
titleTextAlignment = 'titleTextAlignment',
|
|
76
|
+
bodyTextColor = 'bodyTextColor',
|
|
77
|
+
bodyTextFont = 'bodyTextFont',
|
|
78
|
+
bodyTextSize = 'bodyTextSize',
|
|
79
|
+
bodyTextAlignment = 'bodyTextAlignment',
|
|
80
|
+
footnoteTextColor = 'footnoteTextColor',
|
|
81
|
+
footnoteTextFont = 'footnoteTextFont',
|
|
82
|
+
footnoteTextSize = 'footnoteTextSize',
|
|
83
|
+
formLabelTextColor = 'formLabelTextColor',
|
|
84
|
+
formLabelTextFont = 'formLabelTextFont',
|
|
85
|
+
textFieldTextColor = 'textFieldTextColor',
|
|
86
|
+
textFieldBackgroundColor = 'textFieldBackgroundColor',
|
|
87
|
+
textFieldBorderColor = 'textFieldBorderColor',
|
|
88
|
+
pickerTextColor = 'pickerTextColor',
|
|
89
|
+
pickerTextFont = 'pickerTextFont',
|
|
90
|
+
cameraInstructionsTextColor = 'cameraInstructionsTextColor',
|
|
91
|
+
cameraInstructionsTextFont = 'cameraInstructionsTextFont',
|
|
92
|
+
cameraInstructionsTextSize = 'cameraInstructionsTextFont',
|
|
93
|
+
cameraHintTextColor = 'cameraHintTextColor',
|
|
94
|
+
cameraHintTextFont = 'cameraHintTextFont',
|
|
95
|
+
cameraHintTextSize = 'cameraHintTextSize',
|
|
96
|
+
cameraGuideHintTextColor = 'cameraGuideHintTextColor',
|
|
97
|
+
cameraGuideHintTextFont = 'cameraGuideHintTextFont',
|
|
98
|
+
cameraGuideHintTextSize = 'cameraGuideHintTextSize',
|
|
99
|
+
buttonBackgroundColor = 'buttonBackgroundColor',
|
|
100
|
+
buttonDisabledBackgroundColor = 'buttonDisabledBackgroundColor',
|
|
101
|
+
buttonTouchedBackgroundColor = 'buttonTouchedBackgroundColor',
|
|
102
|
+
buttonImageTintColor = 'buttonImageTintColor',
|
|
103
|
+
buttonImageHidden = 'buttonImageHidden',
|
|
104
|
+
buttonCornerRadius = 'buttonCornerRadius',
|
|
105
|
+
buttonTextAlignment = 'buttonTextAlignment',
|
|
106
|
+
buttonDisabledTextColor = 'buttonDisabledTextColor',
|
|
107
|
+
buttonTextColor = 'buttonTextColor',
|
|
108
|
+
buttonFont = 'buttonFont',
|
|
109
|
+
buttonTextSize = 'buttonTextSize',
|
|
110
|
+
selectedCellBackgroundColor = 'selectedCellBackgroundColor',
|
|
111
|
+
closeButtonTintColor = 'closeButtonTintColor',
|
|
112
|
+
cancelButtonBackgroundColor = 'cancelButtonBackgroundColor',
|
|
113
|
+
cameraButtonBackgroundColor = 'cameraButtonBackgroundColor',
|
|
114
|
+
cameraGuideCornersColor = 'cameraGuideCornersColor',
|
|
115
|
+
successAssetName = 'successAssetName',
|
|
116
|
+
successAssetWidth = 'successAssetWidth',
|
|
117
|
+
successAssetHeight = 'successAssetHeight',
|
|
118
|
+
verificationFailAssetName = 'verificationFailAssetName',
|
|
119
|
+
verificationFailAssetWidth = 'verificationFailAssetWidth',
|
|
120
|
+
verificationFailAssetHeight = 'verificationFailAssetHeight',
|
|
121
|
+
failAssetName = 'failAssetName',
|
|
122
|
+
failAssetWidth = 'failAssetWidth',
|
|
123
|
+
failAssetHeight = 'failAssetHeight',
|
|
124
|
+
loadingAnimationAssetName = 'loadingAnimationAssetName',
|
|
125
|
+
loadingAnimationAssetWidth = 'loadingAnimationAssetWidth',
|
|
126
|
+
loadingAnimationAssetHeight = 'loadingAnimationAssetHeight',
|
|
127
|
+
processingAnimationAssetName = 'processingAnimationAssetName',
|
|
128
|
+
processingAnimationAssetWidth = 'processingAnimationAssetWidth',
|
|
129
|
+
processingAnimationAssetHeight = 'processingAnimationAssetHeight',
|
|
130
|
+
selfieAnimationAssetName = 'selfieAnimationAssetName',
|
|
131
|
+
selfieAnimationAssetWidth = 'selfieAnimationAssetWidth',
|
|
132
|
+
selfieAnimationAssetHeight = 'selfieAnimationAssetHeight',
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export type AndroidThemeObject = {
|
|
@@ -143,31 +143,31 @@ export type IosThemeObject = {
|
|
|
143
143
|
export type ThemeObject = AndroidThemeObject | IosThemeObject;
|
|
144
144
|
|
|
145
145
|
class Theme {
|
|
146
|
-
async print(platform: string =
|
|
146
|
+
async print(platform: string = 'android') {
|
|
147
147
|
const config = await Config.get();
|
|
148
148
|
const themeConfig =
|
|
149
|
-
platform ===
|
|
149
|
+
platform === 'android' ? config.androidTheme : config.iosTheme;
|
|
150
150
|
let usesCustomFontAndroid = false;
|
|
151
151
|
let usesCustomFontIos = false;
|
|
152
152
|
|
|
153
153
|
const head =
|
|
154
|
-
platform ===
|
|
155
|
-
? [
|
|
156
|
-
: [
|
|
154
|
+
platform === 'android'
|
|
155
|
+
? ['Style Item', 'Value', 'Note']
|
|
156
|
+
: ['Style Item', 'Value', 'Note'];
|
|
157
157
|
|
|
158
158
|
const table = new Table({
|
|
159
159
|
head,
|
|
160
160
|
// prettier-ignore
|
|
161
|
-
chars: { 'mid': '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' }
|
|
161
|
+
chars: { 'mid': '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' },
|
|
162
162
|
});
|
|
163
163
|
|
|
164
|
-
console.log(
|
|
164
|
+
console.log('Specified theme values:');
|
|
165
165
|
const keyEnum =
|
|
166
|
-
platform ===
|
|
166
|
+
platform === 'android' ? ANDROID_THEME_CONFIG_KEY : IOS_THEME_CONFIG_KEY;
|
|
167
167
|
for (const key in keyEnum) {
|
|
168
168
|
let override =
|
|
169
169
|
themeConfig[key as ANDROID_THEME_CONFIG_KEY | IOS_THEME_CONFIG_KEY];
|
|
170
|
-
let colorOverride = key.includes(
|
|
170
|
+
let colorOverride = key.includes('Color') || key.includes('color');
|
|
171
171
|
|
|
172
172
|
if (override) {
|
|
173
173
|
if (colorOverride) {
|
|
@@ -177,8 +177,8 @@ class Theme {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
if (key.includes(
|
|
181
|
-
if (platform ==
|
|
180
|
+
if (key.includes('Font')) {
|
|
181
|
+
if (platform == 'android') {
|
|
182
182
|
usesCustomFontAndroid = true;
|
|
183
183
|
} else {
|
|
184
184
|
usesCustomFontIos = true;
|
|
@@ -191,10 +191,10 @@ class Theme {
|
|
|
191
191
|
key,
|
|
192
192
|
override
|
|
193
193
|
? valueColor(colorOverride, override)
|
|
194
|
-
: chalk.yellow(
|
|
195
|
-
key.includes(
|
|
196
|
-
? chalk.cyan(
|
|
197
|
-
:
|
|
194
|
+
: chalk.yellow('unspecified'),
|
|
195
|
+
key.includes('Font')
|
|
196
|
+
? chalk.cyan('Fonts that are not built-in need to be installed.')
|
|
197
|
+
: '',
|
|
198
198
|
];
|
|
199
199
|
|
|
200
200
|
table.push(row);
|
|
@@ -204,31 +204,33 @@ class Theme {
|
|
|
204
204
|
|
|
205
205
|
if (usesCustomFontAndroid) {
|
|
206
206
|
console.log(
|
|
207
|
-
chalk.yellow(
|
|
208
|
-
|
|
207
|
+
chalk.yellow(' NOTE') +
|
|
208
|
+
': A font customization was made. If the font is not built-in to the Android platform (https://github.com/react-native-training/react-native-fonts#android), then the font(s) must first be installed. A guide to install a font can be found here: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml'
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
if (usesCustomFontIos) {
|
|
213
213
|
console.log(
|
|
214
|
-
chalk.yellow(
|
|
215
|
-
|
|
214
|
+
chalk.yellow(' NOTE') +
|
|
215
|
+
': A font customization was made. If the font is not built-in iOS (https://github.com/react-native-training/react-native-ios), then the font(s) must first be installed. A guide to install a font can be found here: https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app'
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
// Add newline for spacing
|
|
220
|
-
console.log(
|
|
220
|
+
console.log('');
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
// set default print color for non-color overrides
|
|
225
|
-
function valueColor(isColorOverride, override) {
|
|
226
|
-
return isColorOverride
|
|
225
|
+
function valueColor(isColorOverride: boolean, override: string) {
|
|
226
|
+
return isColorOverride
|
|
227
|
+
? chalk.hex(override)(override)
|
|
228
|
+
: chalk.magentaBright(override);
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
function normalizeColor(colorHex: string, themeKey: string) {
|
|
230
232
|
let hex = colorHex;
|
|
231
|
-
if (colorHex[0] ===
|
|
233
|
+
if (colorHex[0] === '#') {
|
|
232
234
|
hex = colorHex.slice(1);
|
|
233
235
|
}
|
|
234
236
|
|
|
@@ -238,19 +240,19 @@ function normalizeColor(colorHex: string, themeKey: string) {
|
|
|
238
240
|
`Received a color value of ${chalk.yellow(colorHex)} for ${chalk.red(
|
|
239
241
|
themeKey
|
|
240
242
|
)}.\nFormat must follow standard 6 character hexadecimal color code. Eg. ${chalk
|
|
241
|
-
.bgHex(
|
|
242
|
-
.hex(
|
|
243
|
+
.bgHex('#FFFFFF')
|
|
244
|
+
.hex('#7E66B7')('#290087')}`
|
|
243
245
|
);
|
|
244
246
|
} else {
|
|
245
247
|
console.error(
|
|
246
248
|
`Received a color value of ${chalk.yellow(
|
|
247
249
|
colorHex
|
|
248
250
|
)}.\nFormat must follow standard 6 character hexadecimal color code. Eg. ${chalk
|
|
249
|
-
.bgHex(
|
|
250
|
-
.hex(
|
|
251
|
+
.bgHex('#FFFFFF')
|
|
252
|
+
.hex('#7E66B7')('#290087')}`
|
|
251
253
|
);
|
|
252
254
|
}
|
|
253
|
-
console.log(
|
|
255
|
+
console.log('');
|
|
254
256
|
process.exit(1);
|
|
255
257
|
}
|
|
256
258
|
|
package/persona-tools/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Config from
|
|
2
|
-
import { TOOL_CHOICE, whatWouldYouLikePrompt } from
|
|
3
|
-
import AndroidThemeGenerator from
|
|
4
|
-
import IosThemeInstructions from
|
|
1
|
+
import Config from './Config';
|
|
2
|
+
import { TOOL_CHOICE, whatWouldYouLikePrompt } from './lib/prompts';
|
|
3
|
+
import AndroidThemeGenerator from './tools/AndroidThemeGenerator';
|
|
4
|
+
import IosThemeInstructions from './tools/IosThemeInstructions';
|
|
5
5
|
|
|
6
|
-
console.log(
|
|
7
|
-
console.log(
|
|
8
|
-
console.log(
|
|
9
|
-
console.log(
|
|
10
|
-
console.log(
|
|
6
|
+
console.log('');
|
|
7
|
+
console.log('============================================');
|
|
8
|
+
console.log('Persona React Native SDK customization tool.');
|
|
9
|
+
console.log('============================================');
|
|
10
|
+
console.log('');
|
|
11
11
|
|
|
12
12
|
const run = async () => {
|
|
13
13
|
// Run this once to print warning messages if it's not configured.
|