nx-react-native-cli 1.0.7 → 1.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.
- package/README.md +1 -1
- package/contents/.eslintrc.json +293 -0
- package/contents/.husky/pre-commit +5 -0
- package/contents/.husky/pre-push +15 -0
- package/contents/.nvmrc +1 -0
- package/contents/.prettierignore +8 -0
- package/contents/.prettierrc +13 -0
- package/contents/.ruby-version +1 -0
- package/contents/.vscode/extensions.json +10 -0
- package/contents/.vscode/settings.json +18 -0
- package/contents/apps/mobile/.env.template +3 -0
- package/contents/apps/mobile/.eslintrc.json +34 -0
- package/contents/apps/mobile/Gemfile +11 -0
- package/contents/apps/mobile/android/app/build.gradle +164 -0
- package/contents/apps/mobile/android/app/src/dev/res/values/strings.xml +3 -0
- package/contents/apps/mobile/android/app/src/production/res/values/strings.xml +3 -0
- package/contents/apps/mobile/android/build.gradle +34 -0
- package/contents/apps/mobile/babel.config.json +14 -0
- package/contents/apps/mobile/fastlane/.env.template +24 -0
- package/contents/apps/mobile/fastlane/Fastfile +303 -0
- package/contents/apps/mobile/fastlane/Matchfile +5 -0
- package/contents/apps/mobile/fastlane/Pluginfile +6 -0
- package/contents/apps/mobile/fastlane/README.md +65 -0
- package/contents/apps/mobile/package.json +77 -0
- package/contents/apps/mobile/project.json +102 -0
- package/contents/apps/mobile/src/app/index.tsx +68 -0
- package/contents/apps/mobile/src/components/atoms/BottomSheet/bottom-sheet.component.tsx +145 -0
- package/contents/apps/mobile/src/components/atoms/BottomSheet/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/Button/button.component.tsx +55 -0
- package/contents/apps/mobile/src/components/atoms/Button/index.ts +2 -0
- package/contents/apps/mobile/src/components/atoms/Button/outlined-button.component.tsx +59 -0
- package/contents/apps/mobile/src/components/atoms/Divider/divider-component.tsx +13 -0
- package/contents/apps/mobile/src/components/atoms/Divider/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/InputLayout/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/InputLayout/input-layout.component.tsx +34 -0
- package/contents/apps/mobile/src/components/atoms/ListLoadingItem/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/ListLoadingItem/list-loading-item.component.tsx +56 -0
- package/contents/apps/mobile/src/components/atoms/Modal/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/Modal/modal.component.tsx +58 -0
- package/contents/apps/mobile/src/components/atoms/ScreenLoader/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/ScreenLoader/screen-loader.component.tsx +17 -0
- package/contents/apps/mobile/src/components/atoms/Skeleton/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/Skeleton/skeleton.component.tsx +42 -0
- package/contents/apps/mobile/src/components/atoms/Text/index.ts +1 -0
- package/contents/apps/mobile/src/components/atoms/Text/text.component.tsx +23 -0
- package/contents/apps/mobile/src/components/atoms/TextInput/constants.ts +43 -0
- package/contents/apps/mobile/src/components/atoms/TextInput/index.ts +2 -0
- package/contents/apps/mobile/src/components/atoms/TextInput/text-input.component.tsx +137 -0
- package/contents/apps/mobile/src/components/atoms/index.ts +10 -0
- package/contents/apps/mobile/src/components/index.ts +3 -0
- package/contents/apps/mobile/src/components/molecules/BackButton/back-button.component.tsx +58 -0
- package/contents/apps/mobile/src/components/molecules/BackButton/index.ts +1 -0
- package/contents/apps/mobile/src/components/molecules/BottomActionsContainer/BottomActionsContainer.component.tsx +28 -0
- package/contents/apps/mobile/src/components/molecules/BottomActionsContainer/index.ts +1 -0
- package/contents/apps/mobile/src/components/molecules/ScreenContainer/index.ts +1 -0
- package/contents/apps/mobile/src/components/molecules/ScreenContainer/screen-container.component.tsx +100 -0
- package/contents/apps/mobile/src/components/molecules/ScreenHeader/index.ts +1 -0
- package/contents/apps/mobile/src/components/molecules/ScreenHeader/screen-header.component.tsx +71 -0
- package/contents/apps/mobile/src/components/molecules/StorageManager/StorageManager.component.tsx +18 -0
- package/contents/apps/mobile/src/components/molecules/StorageManager/index.ts +1 -0
- package/contents/apps/mobile/src/components/molecules/index.ts +5 -0
- package/contents/apps/mobile/src/components/organisms/index.ts +1 -0
- package/contents/apps/mobile/src/config/index.ts +13 -0
- package/contents/apps/mobile/src/dimens/index.ts +1 -0
- package/contents/apps/mobile/src/env.d.ts +17 -0
- package/contents/apps/mobile/src/hooks/index.ts +9 -0
- package/contents/apps/mobile/src/hooks/useAppState.hook.tsx +20 -0
- package/contents/apps/mobile/src/hooks/useApplicationDimensions.hook.tsx +10 -0
- package/contents/apps/mobile/src/hooks/useDebounce.hook.ts +11 -0
- package/contents/apps/mobile/src/hooks/useGetLayoutHeight.hook.tsx +27 -0
- package/contents/apps/mobile/src/hooks/useGetLayoutWidth.hook.tsx +27 -0
- package/contents/apps/mobile/src/hooks/useNavigation.hook.tsx +8 -0
- package/contents/apps/mobile/src/hooks/useShakeAnimation.hook.tsx +32 -0
- package/contents/apps/mobile/src/hooks/useTextInputChangeFocus.hook.tsx +12 -0
- package/contents/apps/mobile/src/hooks/useThrottle.hook.ts +11 -0
- package/contents/apps/mobile/src/icons/arrow-left.svg +3 -0
- package/contents/apps/mobile/src/icons/checkbox-active.svg +4 -0
- package/contents/apps/mobile/src/icons/checkbox-unactive.svg +4 -0
- package/contents/apps/mobile/src/icons/close.svg +3 -0
- package/contents/apps/mobile/src/icons/download.svg +4 -0
- package/contents/apps/mobile/src/icons/email.svg +10 -0
- package/contents/apps/mobile/src/icons/eye-slash.svg +11 -0
- package/contents/apps/mobile/src/icons/eye.svg +4 -0
- package/contents/apps/mobile/src/icons/gear.svg +4 -0
- package/contents/apps/mobile/src/icons/home.svg +3 -0
- package/contents/apps/mobile/src/icons/index.ts +33 -0
- package/contents/apps/mobile/src/icons/pencil.svg +3 -0
- package/contents/apps/mobile/src/icons/phone.svg +3 -0
- package/contents/apps/mobile/src/icons/user-circle.svg +3 -0
- package/contents/apps/mobile/src/icons/user.svg +4 -0
- package/contents/apps/mobile/src/icons/warning.svg +3 -0
- package/contents/apps/mobile/src/main.tsx +5 -0
- package/contents/apps/mobile/src/routes/index.tsx +65 -0
- package/contents/apps/mobile/src/routes/privateRoutes.tsx +32 -0
- package/contents/apps/mobile/src/routes/publicRoutes.tsx +26 -0
- package/contents/apps/mobile/src/routes/routes.enum.ts +5 -0
- package/contents/apps/mobile/src/routes/screen-options.ts +9 -0
- package/contents/apps/mobile/src/routes/screens.enum.ts +4 -0
- package/contents/apps/mobile/src/screens/HomeScreen/home.screen.tsx +12 -0
- package/contents/apps/mobile/src/screens/LoginScreen/login.screen.tsx +13 -0
- package/contents/apps/mobile/src/stores/index.ts +1 -0
- package/contents/apps/mobile/src/stores/local-storage.store.ts +60 -0
- package/contents/apps/mobile/src/stores/mmkvStorage.ts +19 -0
- package/contents/apps/mobile/src/tailwind/index.ts +24 -0
- package/contents/apps/mobile/src/types/component.type.ts +13 -0
- package/contents/apps/mobile/src/types/index.ts +1 -0
- package/contents/apps/mobile/tailwind.config.js +80 -0
- package/contents/apps/mobile/tsconfig.app.json +11 -0
- package/contents/check-env.sh +44 -0
- package/contents/clean-generated-outputs.sh +32 -0
- package/lib/index.cjs +39 -39
- package/package.json +3 -2
- package/lib/index.js +0 -75
package/README.md
CHANGED
|
@@ -24,6 +24,6 @@ This NPM library package allows you to effortlessly generate a Nx workspace with
|
|
|
24
24
|
|
|
25
25
|
<h2 id="🛠-usage">🛠 Usage</h2>
|
|
26
26
|
<p>Generate a new Nx workspace with the React Native preset:</p>
|
|
27
|
-
<pre><code class="language-bash">npx nx-react-native-cli@latest
|
|
27
|
+
<pre><code class="language-bash">npx nx-react-native-cli@latest create
|
|
28
28
|
</code></pre>
|
|
29
29
|
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": ["**/*"],
|
|
4
|
+
"plugins": ["@nx"],
|
|
5
|
+
"settings": {
|
|
6
|
+
"import/parsers": {
|
|
7
|
+
"@typescript-eslint/parser": [".ts", ".tsx"] // @typescript-eslint/parser
|
|
8
|
+
},
|
|
9
|
+
"import/resolver": {
|
|
10
|
+
"typescript": {
|
|
11
|
+
"project": ["tsconfig.base.json"]
|
|
12
|
+
},
|
|
13
|
+
"node": {
|
|
14
|
+
"project": ["tsconfig.base.json"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"overrides": [
|
|
19
|
+
{
|
|
20
|
+
"parserOptions": {
|
|
21
|
+
"project": "tsconfig.base.json"
|
|
22
|
+
},
|
|
23
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
24
|
+
"extends": [
|
|
25
|
+
"airbnb-typescript", // eslint-config-airbnb-typescript
|
|
26
|
+
"eslint:recommended", // eslint-plugin-react
|
|
27
|
+
"plugin:react/recommended", // eslint-plugin-react
|
|
28
|
+
"plugin:react-hooks/recommended", // eslint-plugin-react-hooks
|
|
29
|
+
"plugin:react-perf/recommended", // eslint-plugin-react-perf
|
|
30
|
+
"plugin:sonarjs/recommended", // eslint-plugin-sonarjs
|
|
31
|
+
"plugin:@tanstack/eslint-plugin-query/recommended", // @tanstack/eslint-plugin-query
|
|
32
|
+
"plugin:tailwindcss/recommended", // eslint-plugin-tailwindcss
|
|
33
|
+
"prettier" // eslint-config-prettier
|
|
34
|
+
],
|
|
35
|
+
"plugins": [
|
|
36
|
+
"@typescript-eslint", // @typescript-eslint/eslint-plugin
|
|
37
|
+
"react", // eslint-plugin-react
|
|
38
|
+
"react-perf", // eslint-plugin-react-perf
|
|
39
|
+
"react-hooks", // eslint-plugin-react-hooks
|
|
40
|
+
"@tanstack/query", // @tanstack/eslint-plugin-query
|
|
41
|
+
"sonarjs", // eslint-plugin-sonarjs
|
|
42
|
+
"import", // eslint-plugin-import
|
|
43
|
+
"sort-destructure-keys", // eslint-plugin-sort-destructure-keys
|
|
44
|
+
"sort-keys-fix", // eslint-plugin-sort-keys-fix
|
|
45
|
+
"prettier" // eslint-plugin-prettier
|
|
46
|
+
],
|
|
47
|
+
"settings": {
|
|
48
|
+
"import/resolver": {
|
|
49
|
+
"node": {
|
|
50
|
+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
|
51
|
+
},
|
|
52
|
+
"typescript": {}
|
|
53
|
+
},
|
|
54
|
+
"react": {
|
|
55
|
+
"version": "detect"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"rules": {
|
|
59
|
+
"@nx/enforce-module-boundaries": [
|
|
60
|
+
"error",
|
|
61
|
+
{
|
|
62
|
+
"enforceBuildableLibDependency": true,
|
|
63
|
+
"allow": [],
|
|
64
|
+
"depConstraints": [
|
|
65
|
+
{
|
|
66
|
+
"sourceTag": "*",
|
|
67
|
+
"onlyDependOnLibsWithTags": ["*"]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"@tanstack/query/exhaustive-deps": "error",
|
|
73
|
+
"array-bracket-spacing": ["error", "never"],
|
|
74
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
75
|
+
"arrow-parens": ["error", "always"],
|
|
76
|
+
"brace-style": "error",
|
|
77
|
+
"comma-dangle": [
|
|
78
|
+
"error",
|
|
79
|
+
{
|
|
80
|
+
"arrays": "always-multiline",
|
|
81
|
+
"exports": "always-multiline",
|
|
82
|
+
"functions": "only-multiline",
|
|
83
|
+
"imports": "always-multiline",
|
|
84
|
+
"objects": "always-multiline"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"comma-spacing": [
|
|
88
|
+
"error",
|
|
89
|
+
{
|
|
90
|
+
"after": true,
|
|
91
|
+
"before": false
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"curly": "error",
|
|
95
|
+
"eol-last": ["error", "always"],
|
|
96
|
+
"eqeqeq": ["error", "always"],
|
|
97
|
+
"func-names": "error",
|
|
98
|
+
"import/no-extraneous-dependencies": "off",
|
|
99
|
+
"import/no-unresolved": "error",
|
|
100
|
+
"sort-destructure-keys/sort-destructure-keys": [
|
|
101
|
+
"error",
|
|
102
|
+
{
|
|
103
|
+
"caseSensitive": false
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"sort-keys-fix/sort-keys-fix": "warn",
|
|
107
|
+
"import/order": [
|
|
108
|
+
"error",
|
|
109
|
+
{
|
|
110
|
+
"alphabetize": {
|
|
111
|
+
"order": "asc"
|
|
112
|
+
},
|
|
113
|
+
"groups": [
|
|
114
|
+
"builtin",
|
|
115
|
+
"external",
|
|
116
|
+
"internal",
|
|
117
|
+
"parent",
|
|
118
|
+
"sibling",
|
|
119
|
+
"index"
|
|
120
|
+
],
|
|
121
|
+
"newlines-between": "always"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"jsx-quotes": ["error", "prefer-double"],
|
|
125
|
+
"key-spacing": [
|
|
126
|
+
"error",
|
|
127
|
+
{
|
|
128
|
+
"mode": "strict"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"max-depth": ["error", 3],
|
|
132
|
+
"max-len": [
|
|
133
|
+
"error",
|
|
134
|
+
{
|
|
135
|
+
"code": 125,
|
|
136
|
+
"ignoreComments": true,
|
|
137
|
+
"ignoreStrings": true,
|
|
138
|
+
"ignoreTemplateLiterals": true
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"max-params": ["error", 3],
|
|
142
|
+
"no-alert": "error",
|
|
143
|
+
"no-console": "warn",
|
|
144
|
+
"no-duplicate-imports": "error",
|
|
145
|
+
"no-empty-function": "warn",
|
|
146
|
+
"no-extra-boolean-cast": "warn",
|
|
147
|
+
"no-extra-semi": "warn",
|
|
148
|
+
"no-magic-numbers": [
|
|
149
|
+
"error",
|
|
150
|
+
{
|
|
151
|
+
"ignore": [-1, 0, 1, 2, 30, 60, 100, 1000],
|
|
152
|
+
"ignoreArrayIndexes": true
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"no-multi-spaces": "warn",
|
|
156
|
+
"no-multiple-empty-lines": [
|
|
157
|
+
"error",
|
|
158
|
+
{
|
|
159
|
+
"max": 1,
|
|
160
|
+
"maxEOF": 0
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"no-plusplus": "warn",
|
|
164
|
+
"no-trailing-spaces": "warn",
|
|
165
|
+
"no-unreachable": "error",
|
|
166
|
+
"no-unused-expressions": "warn",
|
|
167
|
+
"no-unused-vars": "off",
|
|
168
|
+
"no-use-before-define": "off",
|
|
169
|
+
"no-var": "error",
|
|
170
|
+
"padding-line-between-statements": [
|
|
171
|
+
"error",
|
|
172
|
+
{
|
|
173
|
+
"blankLine": "always",
|
|
174
|
+
"next": "return",
|
|
175
|
+
"prev": "*"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"prefer-arrow-callback": "warn",
|
|
179
|
+
"prefer-const": "error",
|
|
180
|
+
"prettier/prettier": [
|
|
181
|
+
"error",
|
|
182
|
+
{
|
|
183
|
+
"endOfLine": "auto"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"quotes": ["error", "single", { "avoidEscape": true }],
|
|
187
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
188
|
+
"react-hooks/rules-of-hooks": "error",
|
|
189
|
+
"react-perf/jsx-no-new-array-as-prop": "off",
|
|
190
|
+
"react-perf/jsx-no-new-function-as-prop": "off",
|
|
191
|
+
"react-perf/jsx-no-new-object-as-prop": "off",
|
|
192
|
+
"react/display-name": "off",
|
|
193
|
+
"react/jsx-filename-extension": [
|
|
194
|
+
"warn",
|
|
195
|
+
{
|
|
196
|
+
"extensions": [".tsx", ".ts"]
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"react/jsx-handler-names": [
|
|
200
|
+
"error",
|
|
201
|
+
{
|
|
202
|
+
"eventHandlerPrefix": "handle",
|
|
203
|
+
"eventHandlerPropPrefix": "on"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"react/jsx-sort-props": [
|
|
207
|
+
"error",
|
|
208
|
+
{
|
|
209
|
+
"callbacksLast": true,
|
|
210
|
+
"ignoreCase": true,
|
|
211
|
+
"reservedFirst": true,
|
|
212
|
+
"shorthandFirst": true
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"react/prefer-stateless-function": "error",
|
|
216
|
+
"react/prop-types": "off",
|
|
217
|
+
"react/react-in-jsx-scope": "off",
|
|
218
|
+
"react/sort-comp": [
|
|
219
|
+
"error",
|
|
220
|
+
{
|
|
221
|
+
"order": [
|
|
222
|
+
"type-annotations",
|
|
223
|
+
"static-methods",
|
|
224
|
+
"lifecycle",
|
|
225
|
+
"/^handle.+$/",
|
|
226
|
+
"everything-else",
|
|
227
|
+
"render"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"semi": ["error", "always"],
|
|
232
|
+
"semi-spacing": [
|
|
233
|
+
"error",
|
|
234
|
+
{
|
|
235
|
+
"after": true,
|
|
236
|
+
"before": false
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"sonarjs/cognitive-complexity": ["error", 50],
|
|
240
|
+
"sort-keys": [
|
|
241
|
+
"error",
|
|
242
|
+
"asc",
|
|
243
|
+
{
|
|
244
|
+
"caseSensitive": true,
|
|
245
|
+
"minKeys": 2,
|
|
246
|
+
"natural": false
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"space-before-blocks": "error",
|
|
250
|
+
"space-before-function-paren": [
|
|
251
|
+
"error",
|
|
252
|
+
{
|
|
253
|
+
"anonymous": "always",
|
|
254
|
+
"asyncArrow": "always",
|
|
255
|
+
"named": "never"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"space-in-parens": ["error", "never"],
|
|
259
|
+
"tailwindcss/classnames-order": "off"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"files": ["*.ts", "*.tsx"],
|
|
264
|
+
"extends": ["plugin:@nx/typescript"],
|
|
265
|
+
"rules": {
|
|
266
|
+
"@typescript-eslint/consistent-type-definitions": "off",
|
|
267
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
268
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
269
|
+
"@typescript-eslint/no-unused-vars": [
|
|
270
|
+
"error",
|
|
271
|
+
{
|
|
272
|
+
"args": "none"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"@typescript-eslint/ban-types": [
|
|
276
|
+
"error",
|
|
277
|
+
{
|
|
278
|
+
"types": {
|
|
279
|
+
"{}": false,
|
|
280
|
+
"Function": false
|
|
281
|
+
},
|
|
282
|
+
"extendDefaults": true
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"files": ["*.js", "*.jsx"],
|
|
289
|
+
"extends": ["plugin:@nx/javascript"],
|
|
290
|
+
"rules": {}
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
. "$(dirname "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
echo -e "===\n>> Checking branch name..."
|
|
5
|
+
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
|
6
|
+
PROTECTED_BRANCHES="^(main|staging|development)$"
|
|
7
|
+
BRANCH_COMMAND=$(ps -ocommand= -p $PPID | awk '{print $NF}')
|
|
8
|
+
|
|
9
|
+
if [[ "$BRANCH" =~ $PROTECTED_BRANCHES ]]
|
|
10
|
+
then
|
|
11
|
+
echo -e "\n🚫 Cannot push to remote $BRANCH branch, please create your own branch and create a PR." && exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
echo -e ">> Finished checking branch name.\n==="
|
|
15
|
+
|
package/contents/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v18.17.0
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"endOfLine": "auto",
|
|
4
|
+
"plugins": ["prettier-plugin-tailwindcss"],
|
|
5
|
+
"printWidth": 100,
|
|
6
|
+
"semi": true,
|
|
7
|
+
"singleQuote": true,
|
|
8
|
+
"tabWidth": 2,
|
|
9
|
+
"tailwindAttributes": ["className", "style"],
|
|
10
|
+
"tailwindFunctions": ["clsx", "tw", "twMerge"],
|
|
11
|
+
"trailingComma": "all",
|
|
12
|
+
"useTabs": false
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.1.2
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
3
|
+
"editor.formatOnSave": true,
|
|
4
|
+
"editor.codeActionsOnSave": {
|
|
5
|
+
"source.fixAll": "explicit",
|
|
6
|
+
"source.fixAll.stylelint": "never"
|
|
7
|
+
},
|
|
8
|
+
"files.insertFinalNewline": true,
|
|
9
|
+
"[typescriptreact]": {
|
|
10
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
11
|
+
},
|
|
12
|
+
"typescript.preferences.importModuleSpecifier": "project-relative",
|
|
13
|
+
"tailwindCSS.classAttributes": ["className", "style"],
|
|
14
|
+
"tailwindCSS.experimental.classRegex": [
|
|
15
|
+
"tw`([^`]*)",
|
|
16
|
+
["tw.style\\(([^)]*)\\)", "'([^']*)'"]
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
|
|
3
|
+
"ignorePatterns": [
|
|
4
|
+
"!**/*",
|
|
5
|
+
".cache",
|
|
6
|
+
".next/**/*",
|
|
7
|
+
"*.d.ts",
|
|
8
|
+
"*.spec.ts",
|
|
9
|
+
"babel.config.js",
|
|
10
|
+
"jest.config.ts",
|
|
11
|
+
"metro.config.js",
|
|
12
|
+
"node_modules",
|
|
13
|
+
"project.json",
|
|
14
|
+
"react-native.config.js",
|
|
15
|
+
"tailwind.config.js",
|
|
16
|
+
"test-setup.ts",
|
|
17
|
+
"tsconfig.json",
|
|
18
|
+
"tsconfig.spec.json"
|
|
19
|
+
],
|
|
20
|
+
"overrides": [
|
|
21
|
+
{
|
|
22
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
23
|
+
"rules": {}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"files": ["*.ts", "*.tsx"],
|
|
27
|
+
"rules": {}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"files": ["*.js", "*.jsx"],
|
|
31
|
+
"rules": {}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
+
ruby ">= 2.6.10"
|
|
5
|
+
gem "fastlane", "= 2.221.1"
|
|
6
|
+
|
|
7
|
+
gem 'cocoapods', '~> 1.13'
|
|
8
|
+
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
|
|
9
|
+
|
|
10
|
+
plugins_path = File.join(File.dirname(__FILE__), './fastlane', 'Pluginfile')
|
|
11
|
+
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
apply plugin: "com.android.application"
|
|
2
|
+
apply plugin: "com.facebook.react"
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This is the configuration block to customize your React Native Android app.
|
|
6
|
+
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
7
|
+
*/
|
|
8
|
+
react {
|
|
9
|
+
/* Folders */
|
|
10
|
+
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
|
11
|
+
// root = file("../")
|
|
12
|
+
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
|
13
|
+
// reactNativeDir = file("../node_modules/react-native")
|
|
14
|
+
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
|
|
15
|
+
// codegenDir = file("../node_modules/@react-native/codegen")
|
|
16
|
+
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
|
|
17
|
+
// cliFile = file("../node_modules/react-native/cli.js")
|
|
18
|
+
|
|
19
|
+
/* Variants */
|
|
20
|
+
// The list of variants to that are debuggable. For those we're going to
|
|
21
|
+
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
|
22
|
+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
23
|
+
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
24
|
+
|
|
25
|
+
/* Bundling */
|
|
26
|
+
// A list containing the node command and its flags. Default is just 'node'.
|
|
27
|
+
// nodeExecutableAndArgs = ["node"]
|
|
28
|
+
//
|
|
29
|
+
// The command to run when bundling. By default is 'bundle'
|
|
30
|
+
// bundleCommand = "ram-bundle"
|
|
31
|
+
//
|
|
32
|
+
// The path to the CLI configuration file. Default is empty.
|
|
33
|
+
// bundleConfig = file(../rn-cli.config.js)
|
|
34
|
+
//
|
|
35
|
+
// The name of the generated asset file containing your JS bundle
|
|
36
|
+
// bundleAssetName = "MyApplication.android.bundle"
|
|
37
|
+
//
|
|
38
|
+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
39
|
+
// entryFile = file("../js/MyApplication.android.js")
|
|
40
|
+
//
|
|
41
|
+
// A list of extra flags to pass to the 'bundle' commands.
|
|
42
|
+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
43
|
+
// extraPackagerArgs = []
|
|
44
|
+
|
|
45
|
+
/* Hermes Commands */
|
|
46
|
+
// The hermes compiler command to run. By default it is 'hermesc'
|
|
47
|
+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
48
|
+
//
|
|
49
|
+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
50
|
+
// hermesFlags = ["-O", "-output-source-map"]
|
|
51
|
+
entryFile = file("../../src/main.tsx")
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
56
|
+
*/
|
|
57
|
+
def enableProguardInReleaseBuilds = false
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The preferred build flavor of JavaScriptCore (JSC)
|
|
61
|
+
*
|
|
62
|
+
* For example, to use the international variant, you can use:
|
|
63
|
+
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
64
|
+
*
|
|
65
|
+
* The international variant includes ICU i18n library and necessary data
|
|
66
|
+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
67
|
+
* give correct results when using with locales other than en-US. Note that
|
|
68
|
+
* this variant is about 6MiB larger per architecture than default.
|
|
69
|
+
*/
|
|
70
|
+
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
71
|
+
|
|
72
|
+
android {
|
|
73
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
74
|
+
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
75
|
+
namespace "com.appsmobile"
|
|
76
|
+
flavorDimensions "default"
|
|
77
|
+
|
|
78
|
+
defaultConfig {
|
|
79
|
+
applicationId "com.appsmobile"
|
|
80
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
81
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
82
|
+
versionCode 1
|
|
83
|
+
versionName "1.0"
|
|
84
|
+
|
|
85
|
+
testBuildType System.getProperty('testBuildType', 'debug')
|
|
86
|
+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
signingConfigs {
|
|
90
|
+
debug {
|
|
91
|
+
storeFile file('dev.keystore')
|
|
92
|
+
storePassword 'development'
|
|
93
|
+
keyAlias 'dev'
|
|
94
|
+
keyPassword 'development'
|
|
95
|
+
}
|
|
96
|
+
dev {
|
|
97
|
+
storeFile file('dev.keystore')
|
|
98
|
+
storePassword 'development'
|
|
99
|
+
keyAlias 'dev'
|
|
100
|
+
keyPassword 'development'
|
|
101
|
+
}
|
|
102
|
+
production {
|
|
103
|
+
storeFile file('production.keystore')
|
|
104
|
+
storePassword System.getenv("STORE_PASSWORD")
|
|
105
|
+
keyAlias System.getenv("KEY_ALIAS")
|
|
106
|
+
keyPassword System.getenv("KEY_PASSWORD")
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
productFlavors {
|
|
111
|
+
dev {
|
|
112
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
113
|
+
applicationId "com.appsmobile"
|
|
114
|
+
applicationIdSuffix ".dev"
|
|
115
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
116
|
+
resValue "string", "build_config_package", "com.appsmobile.dev"
|
|
117
|
+
signingConfig signingConfigs.dev
|
|
118
|
+
}
|
|
119
|
+
production {
|
|
120
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
121
|
+
applicationId "com.appsmobile"
|
|
122
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
123
|
+
resValue "string", "build_config_package", "com.appsmobile"
|
|
124
|
+
signingConfig signingConfigs.production
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
buildTypes {
|
|
129
|
+
debug {
|
|
130
|
+
}
|
|
131
|
+
release {
|
|
132
|
+
// Caution! In production, you need to generate your own keystore file.
|
|
133
|
+
// see https://reactnative.dev/docs/signed-apk-android.
|
|
134
|
+
minifyEnabled enableProguardInReleaseBuilds
|
|
135
|
+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
136
|
+
|
|
137
|
+
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
dependencies {
|
|
144
|
+
|
|
145
|
+
androidTestImplementation('com.wix:detox:+')
|
|
146
|
+
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
147
|
+
|
|
148
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
149
|
+
implementation("com.facebook.react:react-android")
|
|
150
|
+
|
|
151
|
+
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
|
|
152
|
+
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
|
153
|
+
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
|
157
|
+
if (hermesEnabled.toBoolean()) {
|
|
158
|
+
implementation("com.facebook.react:hermes-android")
|
|
159
|
+
} else {
|
|
160
|
+
implementation jscFlavor
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
+
|
|
3
|
+
buildscript {
|
|
4
|
+
ext {
|
|
5
|
+
buildToolsVersion = "33.0.0"
|
|
6
|
+
minSdkVersion = 24
|
|
7
|
+
compileSdkVersion = 34
|
|
8
|
+
targetSdkVersion = 34
|
|
9
|
+
kotlinVersion = "1.8.20"
|
|
10
|
+
|
|
11
|
+
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
|
12
|
+
ndkVersion = "23.1.7779620"
|
|
13
|
+
}
|
|
14
|
+
repositories {
|
|
15
|
+
google()
|
|
16
|
+
mavenCentral()
|
|
17
|
+
}
|
|
18
|
+
dependencies {
|
|
19
|
+
classpath("com.android.tools.build:gradle")
|
|
20
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
21
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
allprojects {
|
|
26
|
+
repositories {
|
|
27
|
+
|
|
28
|
+
maven {
|
|
29
|
+
// https://wix.github.io/Detox/docs/introduction/project-setup
|
|
30
|
+
url("$rootDir/../node_modules/detox/Detox-android")
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
}
|