@ronas-it/nx-generators 0.8.1 → 0.8.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 +8 -3
- package/generators.json +5 -0
- package/package.json +1 -1
- package/src/generators/code-checks/files/.eslint.ronasit.json.template +186 -0
- package/src/generators/code-checks/files/.eslintrc.json.template +1 -1
- package/src/generators/expo-app/app-files/README.md.template +24 -9
- package/src/generators/expo-app/app-files/eas.json.template +25 -14
- package/src/generators/expo-app/generator.js +10 -7
- package/src/generators/expo-app/generator.js.map +1 -1
- package/src/generators/expo-app/scripts.d.ts +3 -2
- package/src/generators/expo-app/scripts.js +3 -2
- package/src/generators/expo-app/scripts.js.map +1 -1
- package/src/generators/form/generator.js +1 -1
- package/src/generators/form/generator.js.map +1 -1
- package/src/generators/form/utils/get-app-name.d.ts +1 -0
- package/src/generators/form/utils/get-app-name.js +8 -0
- package/src/generators/form/utils/get-app-name.js.map +1 -0
- package/src/generators/form/utils/get-form-utils-directory.d.ts +2 -1
- package/src/generators/form/utils/get-form-utils-directory.js +15 -5
- package/src/generators/form/utils/get-form-utils-directory.js.map +1 -1
- package/src/generators/form/utils/index.d.ts +1 -0
- package/src/generators/form/utils/index.js +1 -0
- package/src/generators/form/utils/index.js.map +1 -1
- package/src/generators/next-app/generator.js +1 -1
- package/src/generators/next-app/generator.js.map +1 -1
- package/src/generators/react-component/files/component.tsx.template +13 -3
- package/src/generators/react-component/generator.js +2 -1
- package/src/generators/react-component/generator.js.map +1 -1
- package/src/generators/react-component/schema.d.ts +1 -0
- package/src/generators/react-component/schema.json +5 -0
- package/src/generators/react-lib/files/lib/component.tsx.template +13 -3
- package/src/generators/react-lib/generator.js +13 -24
- package/src/generators/react-lib/generator.js.map +1 -1
- package/src/generators/react-lib/schema.d.ts +1 -0
- package/src/generators/react-lib/schema.json +4 -0
- package/src/generators/react-lib/utils/get-lib-directory-name.d.ts +1 -0
- package/src/generators/react-lib/utils/get-lib-directory-name.js +15 -0
- package/src/generators/react-lib/utils/get-lib-directory-name.js.map +1 -0
- package/src/generators/react-lib/utils/index.d.ts +1 -0
- package/src/generators/react-lib/utils/index.js +5 -0
- package/src/generators/react-lib/utils/index.js.map +1 -0
- package/src/shared/dependencies.d.ts +1 -0
- package/src/shared/dependencies.js +1 -0
- package/src/shared/dependencies.js.map +1 -1
- package/src/shared/generators/auth/generator.d.ts +2 -4
- package/src/shared/generators/auth/generator.js +1 -0
- package/src/shared/generators/auth/generator.js.map +1 -1
- package/src/shared/generators/auth/schema.d.ts +4 -0
- package/src/shared/generators/auth/schema.json +27 -0
- package/src/shared/generators/form-utils/generator.d.ts +0 -1
- package/src/shared/generators/form-utils/generator.js.map +1 -1
- package/src/shared/generators/ui-kitten/generator.d.ts +1 -2
- package/src/shared/generators/ui-kitten/generator.js +1 -9
- package/src/shared/generators/ui-kitten/generator.js.map +1 -1
- package/src/shared/generators/ui-kitten/schema.d.ts +0 -1
- package/src/shared/generators/ui-kitten/schema.json +1 -7
- package/src/shared/utils/cli-utils.d.ts +2 -0
- package/src/shared/utils/cli-utils.js +36 -1
- package/src/shared/utils/cli-utils.js.map +1 -1
- package/src/shared/utils/config-utils.d.ts +1 -1
- package/src/shared/utils/config-utils.js +13 -10
- package/src/shared/utils/config-utils.js.map +1 -1
- package/src/generators/code-checks/files/.eslint.ronasit.js.template +0 -186
package/README.md
CHANGED
|
@@ -125,12 +125,15 @@ Generates a library according to [NX notation](https://nx.dev/concepts/more-conc
|
|
|
125
125
|
1. `withComponent` (optional) - generate the library with `lib/component.tsx` file.
|
|
126
126
|
This option is for `features` or `ui` library.
|
|
127
127
|
|
|
128
|
+
1. `withComponentForwardRef` (optional) - generate a component with `forwardRef` in `lib/component.tsx` file.
|
|
129
|
+
This option works if `withComponent` is `true`.
|
|
130
|
+
|
|
128
131
|
1. `dryRun` (optional) - generate the library without creating files
|
|
129
132
|
|
|
130
133
|
#### Example
|
|
131
134
|
|
|
132
135
|
```sh
|
|
133
|
-
npx nx g react-lib --app=mobile --scope=account --type=features --name=profile-settings --withComponent --dryRun
|
|
136
|
+
npx nx g react-lib --app=mobile --scope=account --type=features --name=profile-settings --withComponent --withComponentForwardRef --dryRun
|
|
134
137
|
```
|
|
135
138
|
or
|
|
136
139
|
```sh
|
|
@@ -147,14 +150,16 @@ Creates a React component in particular library.
|
|
|
147
150
|
|
|
148
151
|
2. `subcomponent` (optional) - generate a folder for components
|
|
149
152
|
|
|
153
|
+
3. `withForwardRef` (optional) - generate a component with forwardRef
|
|
154
|
+
|
|
150
155
|
#### Example
|
|
151
156
|
|
|
152
157
|
```sh
|
|
153
|
-
npx nx g react-component --name=AppButton --subcomponent
|
|
158
|
+
npx nx g react-component --name=AppButton --subcomponent --withForwardRef
|
|
154
159
|
```
|
|
155
160
|
or
|
|
156
161
|
```sh
|
|
157
|
-
npx nx g react-component AppButton --subcomponent
|
|
162
|
+
npx nx g react-component AppButton --subcomponent --withForwardRef
|
|
158
163
|
```
|
|
159
164
|
|
|
160
165
|
### 7. `entity-api`
|
package/generators.json
CHANGED
|
@@ -54,6 +54,11 @@
|
|
|
54
54
|
"factory": "./src/generators/lib-tags/generator",
|
|
55
55
|
"schema": "./src/generators/lib-tags/schema.json",
|
|
56
56
|
"description": "lib-tags generator"
|
|
57
|
+
},
|
|
58
|
+
"auth": {
|
|
59
|
+
"factory": "./src/shared/generators/auth/generator",
|
|
60
|
+
"schema": "./src/shared/generators/auth/schema.json",
|
|
61
|
+
"description": "authentication library for Expo projects"
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"env": {
|
|
4
|
+
"node": true
|
|
5
|
+
},
|
|
6
|
+
"parser": "@typescript-eslint/parser",
|
|
7
|
+
"parserOptions": {
|
|
8
|
+
"ecmaVersion": 6,
|
|
9
|
+
"project": "tsconfig.(base|lib).json",
|
|
10
|
+
"ecmaFeatures": {
|
|
11
|
+
"jsx": true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"settings": {
|
|
15
|
+
"react": {
|
|
16
|
+
"version": "detect"
|
|
17
|
+
},
|
|
18
|
+
"react-native/style-sheet-object-names": ["EStyleSheet"],
|
|
19
|
+
"import/parsers": {
|
|
20
|
+
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
21
|
+
},
|
|
22
|
+
"import/resolver": {
|
|
23
|
+
"typescript": {
|
|
24
|
+
"alwaysTryTypes": true
|
|
25
|
+
},
|
|
26
|
+
"node": {
|
|
27
|
+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"plugins": ["@typescript-eslint", "unused-imports", "react", "react-hooks", "react-native", "import"],
|
|
32
|
+
"extends": [
|
|
33
|
+
"eslint:recommended",
|
|
34
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
35
|
+
"plugin:@typescript-eslint/recommended",
|
|
36
|
+
"plugin:react/recommended",
|
|
37
|
+
"prettier"
|
|
38
|
+
],
|
|
39
|
+
"rules": {
|
|
40
|
+
"indent": ["warn", 2, { "SwitchCase": 1 }],
|
|
41
|
+
"quotes": ["warn", "single", { "allowTemplateLiterals": true }],
|
|
42
|
+
"react/react-in-jsx-scope": "off",
|
|
43
|
+
"arrow-parens": ["warn", "always"],
|
|
44
|
+
"comma-dangle": ["warn", "never"],
|
|
45
|
+
"no-var": "warn",
|
|
46
|
+
"no-dupe-class-members": "off",
|
|
47
|
+
"import/prefer-default-export": "off",
|
|
48
|
+
"implicit-arrow-linebreak": ["warn", "beside"],
|
|
49
|
+
"newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 2 }],
|
|
50
|
+
"function-call-argument-newline": ["warn", "consistent"],
|
|
51
|
+
"function-paren-newline": ["warn", "consistent"],
|
|
52
|
+
"array-element-newline": ["warn", "consistent"],
|
|
53
|
+
"array-bracket-newline": ["warn", { "multiline": true }],
|
|
54
|
+
"padding-line-between-statements": [
|
|
55
|
+
"warn",
|
|
56
|
+
{ "blankLine": "always", "prev": "*", "next": "return" },
|
|
57
|
+
{ "blankLine": "always", "prev": "*", "next": "multiline-block-like" }
|
|
58
|
+
],
|
|
59
|
+
"@typescript-eslint/no-use-before-define": ["warn", { "variables": false }],
|
|
60
|
+
"@typescript-eslint/lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
|
|
61
|
+
"@typescript-eslint/no-inferrable-types": ["warn", { "ignoreParameters": true }],
|
|
62
|
+
"@typescript-eslint/explicit-module-boundary-types": ["warn", { "allowArgumentsExplicitlyTypedAsAny": true }],
|
|
63
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
64
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
|
65
|
+
"warn",
|
|
66
|
+
{ "accessibility": "explicit", "overrides": { "constructors": "no-public" } }
|
|
67
|
+
],
|
|
68
|
+
"@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true }],
|
|
69
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
70
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
71
|
+
"@typescript-eslint/array-type": ["warn", { "default": "generic", "readonly": "generic" }],
|
|
72
|
+
"@typescript-eslint/member-ordering": [
|
|
73
|
+
"warn",
|
|
74
|
+
{
|
|
75
|
+
"default": [
|
|
76
|
+
"public-static-field",
|
|
77
|
+
"protected-static-field",
|
|
78
|
+
"private-static-field",
|
|
79
|
+
"public-instance-field",
|
|
80
|
+
"protected-instance-field",
|
|
81
|
+
"private-instance-field",
|
|
82
|
+
"public-static-accessor",
|
|
83
|
+
"protected-static-accessor",
|
|
84
|
+
"private-static-accessor",
|
|
85
|
+
"public-instance-accessor",
|
|
86
|
+
"protected-instance-accessor",
|
|
87
|
+
"private-instance-accessor",
|
|
88
|
+
"public-constructor",
|
|
89
|
+
"protected-constructor",
|
|
90
|
+
"private-constructor",
|
|
91
|
+
"public-static-method",
|
|
92
|
+
"public-instance-method",
|
|
93
|
+
"protected-static-method",
|
|
94
|
+
"protected-instance-method",
|
|
95
|
+
"private-static-method",
|
|
96
|
+
"private-instance-method"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"@typescript-eslint/naming-convention": [
|
|
101
|
+
"warn",
|
|
102
|
+
{
|
|
103
|
+
"selector": "typeLike",
|
|
104
|
+
"format": ["PascalCase"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"selector": ["parameter"],
|
|
108
|
+
"format": ["camelCase", "PascalCase"],
|
|
109
|
+
"leadingUnderscore": "allow"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"selector": ["classProperty"],
|
|
113
|
+
"format": ["camelCase", "snake_case"],
|
|
114
|
+
"leadingUnderscore": "allow"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"selector": ["method", "accessor"],
|
|
118
|
+
"format": ["camelCase"]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"selector": ["function", "typeProperty"],
|
|
122
|
+
"format": ["camelCase", "PascalCase"]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"selector": "variable",
|
|
126
|
+
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"selector": "enumMember",
|
|
130
|
+
"format": ["UPPER_CASE"]
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"unused-imports/no-unused-imports-ts": "warn",
|
|
134
|
+
"unused-imports/no-unused-vars-ts": [
|
|
135
|
+
"warn",
|
|
136
|
+
{ "vars": "all", "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "ignoreRestSiblings": true }
|
|
137
|
+
],
|
|
138
|
+
"jsx-quotes": ["warn", "prefer-single"],
|
|
139
|
+
"react/jsx-boolean-value": "off",
|
|
140
|
+
"react/self-closing-comp": ["warn", { "component": true, "html": true }],
|
|
141
|
+
"react/jsx-max-props-per-line": [1, { "maximum": { "single": 2, "multi": 1 } }],
|
|
142
|
+
"react/jsx-first-prop-new-line": ["warn", "multiline"],
|
|
143
|
+
"react/prop-types": "off",
|
|
144
|
+
"react-native/no-unused-styles": "warn",
|
|
145
|
+
"react-native/no-inline-styles": "warn",
|
|
146
|
+
"react-native/no-single-element-style-arrays": "warn",
|
|
147
|
+
"react/jsx-fragments": ["warn", "element"],
|
|
148
|
+
"import/newline-after-import": "warn",
|
|
149
|
+
"import/no-unresolved": "error",
|
|
150
|
+
"import/no-cycle": "error",
|
|
151
|
+
"import/order": [
|
|
152
|
+
"warn",
|
|
153
|
+
{
|
|
154
|
+
"groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
|
|
155
|
+
"alphabetize": { "order": "asc" }
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"import/no-duplicates": "warn",
|
|
159
|
+
"react-hooks/exhaustive-deps": "off"
|
|
160
|
+
},
|
|
161
|
+
"overrides": [
|
|
162
|
+
{
|
|
163
|
+
"files": ["*.js"],
|
|
164
|
+
"rules": {
|
|
165
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
166
|
+
"@typescript-eslint/explicit-function-return-type": "off"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"files": ["*actions.ts"],
|
|
171
|
+
"rules": {
|
|
172
|
+
"function-call-argument-newline": ["warn", "always"],
|
|
173
|
+
"function-paren-newline": ["warn", { "minItems": 1 }]
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"files": ["*selectors.ts"],
|
|
178
|
+
"rules": {
|
|
179
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
180
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
181
|
+
"function-call-argument-newline": ["warn", "always"],
|
|
182
|
+
"function-paren-newline": ["warn", "multiline-arguments"]
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
@@ -44,22 +44,37 @@ After that [resign](https://docs.expo.dev/app-signing/app-credentials/#re-signin
|
|
|
44
44
|
1. Push changes: `git push && git push --tags`
|
|
45
45
|
1. Create new release in [Releases](../../../../-/releases) based on tag you pushed
|
|
46
46
|
|
|
47
|
-
### 2.
|
|
47
|
+
### 2. Build
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
Create builds using [EAS Build](https://docs.expo.dev/build/introduction/):
|
|
50
|
+
|
|
51
|
+
- `build:debug` - build [dev-client](https://docs.expo.dev/develop/development-builds/create-a-build/) for local development
|
|
52
|
+
- `build:internal` - build development version for [internal distribution](https://docs.expo.dev/tutorial/eas/internal-distribution-builds/) (APK/Ad-Hoc build)
|
|
53
|
+
- `build:dev` - build development version for internal testing (AAB/IPA build)
|
|
54
|
+
- `build:prod` - build production version for stores (AAB/IPA build)
|
|
55
|
+
|
|
56
|
+
**Tip**: you can [create builds locally](https://docs.expo.dev/build-reference/local-builds/) by passing `--local` flag when starting build command.
|
|
51
57
|
|
|
52
58
|
### 3. Distribute
|
|
53
59
|
|
|
54
|
-
#### Internal
|
|
60
|
+
#### Internal
|
|
61
|
+
|
|
62
|
+
Create an internal or debug build and share the build file within your team.
|
|
63
|
+
|
|
64
|
+
#### Stores
|
|
65
|
+
|
|
66
|
+
Created builds can be submitted to stores using [EAS Submit](https://docs.expo.dev/submit/introduction/):
|
|
67
|
+
|
|
68
|
+
- `submit:dev` - select and submit development build for internal testing in App Store/Google Play. Build will be distributed automatically for all testers.
|
|
69
|
+
- `submit:prod` - select and submit production build to App Store/Google Play. After that you can publish the release manually.
|
|
55
70
|
|
|
56
|
-
-
|
|
57
|
-
|
|
71
|
+
**Tip**: you can skip this step by passing the `--auto-submit` flag when creating builds.
|
|
72
|
+
This will automatically send created builds to App Store/Google Play. Example:
|
|
58
73
|
|
|
59
|
-
|
|
74
|
+
- `build:dev --auto-submit` - build development version and submit for internal testing in App Store/Google Play.
|
|
75
|
+
- `build:prod --auto-submit` - build production version and submit to App Store/Google Play. Release should be published manually.
|
|
60
76
|
|
|
61
|
-
|
|
62
|
-
- iOS: submit production builds App Store Connect using `submit:ios:prod`
|
|
77
|
+
**Note**: initial setup is required for [Android](https://docs.expo.dev/submit/android/) and [iOS](https://docs.expo.dev/submit/ios)
|
|
63
78
|
|
|
64
79
|
### OTA updates
|
|
65
80
|
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
"build": {
|
|
3
3
|
"development": {
|
|
4
4
|
"channel": "development",
|
|
5
|
-
"distribution": "
|
|
6
|
-
"ios": {
|
|
7
|
-
"distribution": "store"
|
|
8
|
-
},
|
|
5
|
+
"distribution": "store",
|
|
9
6
|
"env": {
|
|
10
7
|
"EXPO_PUBLIC_APP_ENV": "development"
|
|
11
8
|
}
|
|
@@ -13,16 +10,11 @@
|
|
|
13
10
|
"debug": {
|
|
14
11
|
"extends": "development",
|
|
15
12
|
"developmentClient": true,
|
|
16
|
-
"
|
|
17
|
-
"distribution": "internal"
|
|
18
|
-
}
|
|
13
|
+
"distribution": "internal"
|
|
19
14
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"distribution": "
|
|
23
|
-
"env": {
|
|
24
|
-
"EXPO_PUBLIC_APP_ENV": "staging"
|
|
25
|
-
}
|
|
15
|
+
"internal": {
|
|
16
|
+
"extends": "development",
|
|
17
|
+
"distribution": "internal"
|
|
26
18
|
},
|
|
27
19
|
"production": {
|
|
28
20
|
"channel": "production",
|
|
@@ -33,6 +25,25 @@
|
|
|
33
25
|
}
|
|
34
26
|
},
|
|
35
27
|
"submit": {
|
|
36
|
-
"
|
|
28
|
+
"development": {
|
|
29
|
+
"android": {
|
|
30
|
+
"track": "internal",
|
|
31
|
+
"releaseStatus": "draft"
|
|
32
|
+
},
|
|
33
|
+
"ios": {
|
|
34
|
+
"ascAppId": "YOUR_APP_ID",
|
|
35
|
+
"appleTeamId": "YOUR_TEAM_ID"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"production": {
|
|
39
|
+
"android": {
|
|
40
|
+
"track": "production",
|
|
41
|
+
"releaseStatus": "draft"
|
|
42
|
+
},
|
|
43
|
+
"ios": {
|
|
44
|
+
"ascAppId": "YOUR_APP_ID",
|
|
45
|
+
"appleTeamId": "YOUR_TEAM_ID"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
37
48
|
}
|
|
38
49
|
}
|
|
@@ -29,19 +29,20 @@ function expoAppGenerator(tree, options) {
|
|
|
29
29
|
yield (0, generators_1.runRNStylesGenerator)(tree, options);
|
|
30
30
|
const shouldGenerateStoreLib = (yield (0, utils_1.askQuestion)('Do you want to create store lib? (y/n): ')) === 'y';
|
|
31
31
|
if (shouldGenerateStoreLib) {
|
|
32
|
-
(0,
|
|
32
|
+
yield (0, generators_1.runStoreGenerator)(tree, Object.assign(Object.assign({}, options), { baseGeneratorType: enums_1.BaseGeneratorType.EXPO_APP }));
|
|
33
33
|
}
|
|
34
34
|
const shouldGenerateApiClientLib = shouldGenerateStoreLib && (yield (0, utils_1.askQuestion)('Do you want to create api client lib? (y/n): ')) === 'y';
|
|
35
35
|
if (shouldGenerateApiClientLib) {
|
|
36
36
|
yield (0, generators_1.runApiClientGenerator)(tree, options);
|
|
37
37
|
}
|
|
38
38
|
const shouldGenerateAuthLibs = shouldGenerateApiClientLib && (yield (0, utils_1.askQuestion)('Do you want to create auth lib? (y/n): ')) === 'y';
|
|
39
|
-
if (shouldGenerateAuthLibs) {
|
|
40
|
-
yield (0, generators_1.runAuthGenerator)(tree, options);
|
|
41
|
-
}
|
|
42
39
|
const shouldGenerateFormUtilsLib = (yield (0, utils_1.askQuestion)('Do you want to create a lib with the form utils? (y/n): ')) === 'y';
|
|
43
40
|
if (shouldGenerateFormUtilsLib) {
|
|
44
|
-
(0, generators_1.runFormUtilsGenerator)(tree, options);
|
|
41
|
+
yield (0, generators_1.runFormUtilsGenerator)(tree, options);
|
|
42
|
+
}
|
|
43
|
+
const shouldGenerateUIKittenLib = (yield (0, utils_1.askQuestion)('Do you want to install @ui-kitten? (y/n): ')) === 'y';
|
|
44
|
+
if (shouldGenerateUIKittenLib) {
|
|
45
|
+
yield (0, generators_1.runUIKittenGenerator)(tree, options);
|
|
45
46
|
}
|
|
46
47
|
// Workaround: Even with the '--e2eTestRunner=none' parameter, the test folder is created. We delete it manually.
|
|
47
48
|
if ((0, fs_1.existsSync)(appTestFolder)) {
|
|
@@ -65,7 +66,7 @@ function expoAppGenerator(tree, options) {
|
|
|
65
66
|
(0, devkit_1.writeJson)(tree, appPackagePath, appPackageJson);
|
|
66
67
|
// Add app files
|
|
67
68
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'app-files'), appRoot, Object.assign(Object.assign({}, options), { formatName: utils_1.formatName,
|
|
68
|
-
formatAppIdentifier: utils_1.formatAppIdentifier, formatDirectory: () => libPath, isUIKittenEnabled:
|
|
69
|
+
formatAppIdentifier: utils_1.formatAppIdentifier, formatDirectory: () => libPath, isUIKittenEnabled: shouldGenerateUIKittenLib, isStoreEnabled: shouldGenerateStoreLib, appDirectory: options.directory }));
|
|
69
70
|
(0, utils_1.addNxAppTag)(tree, options.directory);
|
|
70
71
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'i18n'), i18nRoot, {});
|
|
71
72
|
// Add dependencies
|
|
@@ -75,7 +76,9 @@ function expoAppGenerator(tree, options) {
|
|
|
75
76
|
return () => {
|
|
76
77
|
(0, devkit_1.installPackagesTask)(tree);
|
|
77
78
|
(0, child_process_1.execSync)('npx expo install --fix', { stdio: 'inherit' });
|
|
78
|
-
(
|
|
79
|
+
if (shouldGenerateAuthLibs) {
|
|
80
|
+
(0, child_process_1.execSync)(`npx nx g auth ${options.name} ${options.directory}`, { stdio: 'inherit' });
|
|
81
|
+
}
|
|
79
82
|
};
|
|
80
83
|
});
|
|
81
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AAEpB,uCAAgC;AAChC,2BAAwC;AACxC,4DAA0E;AAC1E,8CAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AAEpB,uCAAgC;AAChC,2BAAwC;AACxC,4DAA0E;AAC1E,8CAAuD;AACvD,wDAQiC;AACjC,8CAAoH;AAEpH,SAAsB,gBAAgB,CACpC,IAAU,EACV,OAA+B;;QAE/B,MAAM,OAAO,GAAG,QAAQ,OAAO,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,QAAQ,GAAG,QAAQ,OAAO,CAAC,SAAS,EAAE,CAAC;QAC7C,MAAM,aAAa,GAAG,QAAQ,OAAO,CAAC,SAAS,MAAM,CAAC;QACtD,MAAM,OAAO,GAAG,GAAG,IAAA,2BAAmB,EAAC,IAAI,CAAC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACpE,MAAM,IAAI,GAAG,CAAC,OAAO,OAAO,CAAC,SAAS,EAAE,EAAE,UAAU,CAAC,CAAC;QAEtD,0BAA0B;QAC1B,IAAA,wBAAQ,EAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;QAErD,IAAI,CAAC,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACzB,IAAA,wBAAQ,EACN,yBAAyB,OAAO,CAAC,IAAI,qBAAqB,OAAO,CAAC,SAAS,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qFAAqF,EAC3L,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;QACJ,CAAC;QAED,uBAAuB;QACvB,MAAM,IAAA,+BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxC,MAA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AAC,SAAS,IAC/B,CAAC;QAEH,IAAA,mBAAW,EAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QACrC,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAEhE,mBAAmB;QACnB,IAAA,qCAA4B,EAC1B,IAAI,kCAEC,2BAAY,CAAC,UAAU,CAAC,GACxB,2BAAY,CAAC,eAAe,CAAC,mCAG7B,8BAAe,CAAC,UAAU,CAAC,GAC3B,8BAAe,CAAC,eAAe,CAAC,EAEtC,CAAC;QAEF,IAAA,qCAA4B,EAAC,IAAI,EAAE,2BAAY,CAAC,UAAU,CAAC,EAAE,8BAAe,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC,CAAC;QAE1G,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;YAC1B,IAAA,wBAAQ,EAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAEzD,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,IAAA,wBAAQ,EAAC,iBAAiB,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACvF,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AArHD,4CAqHC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -2,11 +2,12 @@ declare const _default: {
|
|
|
2
2
|
start: string;
|
|
3
3
|
'start:prod': string;
|
|
4
4
|
'build:dev': string;
|
|
5
|
+
'build:internal': string;
|
|
5
6
|
'build:debug': string;
|
|
6
7
|
'build:prod': string;
|
|
7
8
|
'update:dev': string;
|
|
8
9
|
'update:prod': string;
|
|
9
|
-
'submit:
|
|
10
|
-
'submit:
|
|
10
|
+
'submit:dev': string;
|
|
11
|
+
'submit:prod': string;
|
|
11
12
|
};
|
|
12
13
|
export default _default;
|
|
@@ -4,11 +4,12 @@ exports.default = {
|
|
|
4
4
|
'start': 'cross-env EXPO_PUBLIC_APP_ENV=development npx expo start',
|
|
5
5
|
'start:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production npx expo start',
|
|
6
6
|
'build:dev': 'eas build --no-wait -p all --profile=development',
|
|
7
|
+
'build:internal': 'npm run build:dev -- --profile=internal',
|
|
7
8
|
'build:debug': 'npm run build:dev -- --profile=debug',
|
|
8
9
|
'build:prod': 'npm run build:dev -- --profile=production',
|
|
9
10
|
'update:dev': 'cross-env EXPO_PUBLIC_APP_ENV=development eas update --branch development',
|
|
10
11
|
'update:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production eas update --branch production',
|
|
11
|
-
'submit:
|
|
12
|
-
'submit:
|
|
12
|
+
'submit:dev': 'cross-env EXPO_PUBLIC_APP_ENV=development eas submit --no-wait --profile=development',
|
|
13
|
+
'submit:prod': 'cross-env EXPO_PUBLIC_APP_ENV=production eas submit --no-wait --profile=production',
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=scripts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,OAAO,EAAE,0DAA0D;IACnE,YAAY,EAAE,yDAAyD;IACvE,WAAW,EAAE,kDAAkD;IAC/D,aAAa,EAAE,sCAAsC;IACrD,YAAY,EAAE,2CAA2C;IACzD,YAAY,EAAE,2EAA2E;IACzF,aAAa,EAAE,yEAAyE;IACxF,
|
|
1
|
+
{"version":3,"file":"scripts.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/scripts.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,OAAO,EAAE,0DAA0D;IACnE,YAAY,EAAE,yDAAyD;IACvE,WAAW,EAAE,kDAAkD;IAC/D,gBAAgB,EAAE,yCAAyC;IAC3D,aAAa,EAAE,sCAAsC;IACrD,YAAY,EAAE,2CAA2C;IACzD,YAAY,EAAE,2EAA2E;IACzF,aAAa,EAAE,yEAAyE;IACxF,YAAY,EAAE,sFAAsF;IACpG,aAAa,EAAE,oFAAoF;CACpG,CAAC"}
|
|
@@ -27,7 +27,7 @@ function formGenerator(tree, options) {
|
|
|
27
27
|
if (tree.exists(formFilePath)) {
|
|
28
28
|
throw new Error('The form already exists');
|
|
29
29
|
}
|
|
30
|
-
const formUtilsDirectory = yield (0, utils_2.getFormUtilsDirectory)();
|
|
30
|
+
const formUtilsDirectory = yield (0, utils_2.getFormUtilsDirectory)(tree, (0, utils_2.getAppName)(libPath));
|
|
31
31
|
const formClassName = `${(0, utils_1.formatName)(fileName, true)}FormSchema`;
|
|
32
32
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, `files`), formsPath, { className: formClassName, fileName, formUtilsDirectory });
|
|
33
33
|
(0, utils_2.updateIndex)(formsPath, fileName, tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/form/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAAiH;AACjH,6BAA6B;AAE7B,8CAA+G;AAC/G,4DAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/form/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAAiH;AACjH,6BAA6B;AAE7B,8CAA+G;AAC/G,4DAAyD;AACzD,mCAAuF;AAEvF,SAAsB,aAAa,CAAC,IAAU,EAAE,OAA4B;;QAC1E,iBAAiB;QACjB,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,qBAAa,EAAoD,kCAAkC,CAAC,CAAC;QAC7I,MAAM,kBAAkB,GAAG,IAAA,sBAAc,EAAC,CAAC,mBAAW,C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AAC;YACf,MAAM,IAAA,oBAAY,EAAC,OAAO,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;QACzD,CAAC;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,uBAAuB;QACvB,IAAA,qCAA4B,EAAC,IAAI,EAAE,2BAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1D,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AAvCD,sCAuCC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAppName(path: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-app-name.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/form/utils/get-app-name.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAFD,gCAEC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
export declare function getFormUtilsDirectory(tree: Tree, appName: string): Promise<string>;
|
|
@@ -3,18 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getFormUtilsDirectory = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const utils_1 = require("../../../shared/utils");
|
|
6
|
-
|
|
6
|
+
const generators_1 = require("../../../shared/generators");
|
|
7
|
+
const get_app_name_1 = require("./get-app-name");
|
|
8
|
+
function getFormUtilsPaths() {
|
|
9
|
+
const utilsLibsPaths = (0, utils_1.getNxLibsPaths)([utils_1.LibraryType.UTILS]);
|
|
10
|
+
return (0, utils_1.searchNxLibsPaths)(utilsLibsPaths, 'utils/form/src', 'endsWith');
|
|
11
|
+
}
|
|
12
|
+
function getFormUtilsDirectory(tree, appName) {
|
|
7
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
8
14
|
const { default: autocomplete } = yield (0, utils_1.dynamicImport)('inquirer-autocomplete-standalone');
|
|
9
|
-
const
|
|
10
|
-
const formUtilsLibsPaths = (0, utils_1.searchNxLibsPaths)(utilsLibsPaths, 'utils/form/src', 'endsWith');
|
|
15
|
+
const formUtilsLibsPaths = getFormUtilsPaths();
|
|
11
16
|
if (!formUtilsLibsPaths.length) {
|
|
12
|
-
|
|
17
|
+
const formUtilsAppDirectory = yield (0, utils_1.selectApplication)(tree, 'It\'s necessary to generate form utilities. What application should they be in?');
|
|
18
|
+
yield (0, generators_1.runFormUtilsGenerator)(tree, { directory: formUtilsAppDirectory });
|
|
19
|
+
return (0, utils_1.searchAliasPath)(getFormUtilsPaths()[0]);
|
|
13
20
|
}
|
|
14
21
|
if (formUtilsLibsPaths.length > 1) {
|
|
22
|
+
if (appName === utils_1.constants.sharedValue) {
|
|
23
|
+
return (0, utils_1.searchAliasPath)(formUtilsLibsPaths.find((path) => (0, get_app_name_1.getAppName)(path) === utils_1.constants.sharedValue));
|
|
24
|
+
}
|
|
15
25
|
formUtilsLibsPaths[0] = yield autocomplete({
|
|
16
26
|
message: 'Select the path of the library with the form utilities: ',
|
|
17
|
-
source: (input) => (0, utils_1.filterSource)(input, formUtilsLibsPaths)
|
|
27
|
+
source: (input) => (0, utils_1.filterSource)(input, formUtilsLibsPaths.filter((path) => [appName, utils_1.constants.sharedValue].includes((0, get_app_name_1.getAppName)(path))))
|
|
18
28
|
});
|
|
19
29
|
}
|
|
20
30
|
return (0, utils_1.searchAliasPath)(formUtilsLibsPaths[0]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-form-utils-directory.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/form/utils/get-form-utils-directory.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"get-form-utils-directory.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/form/utils/get-form-utils-directory.ts"],"names":[],"mappings":";;;;AAAA,iDAQ+B;AAC/B,2DAAmE;AAEnE,iDAA4C;AAE5C,SAAS,iBAAiB;IACxB,MAAM,cAAc,GAAG,IAAA,sBAAc,EAAC,CAAC,mBAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,IAAA,yBAAiB,EAAC,cAAc,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;AACzE,CAAC;AAED,SAAsB,qBAAqB,CAAC,IAAU,EAAE,OAAe;;QACrE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,qBAAa,EAAoD,kCAAkC,CAAC,CAAC;QAE7I,MAAM,kBAAkB,GAAG,iBAAiB,EAAE,CAAC;QAE/C,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;YAC/B,MAAM,qBAAqB,GAAG,MAAM,IAAA,yBAAiB,EAAC,IAAI,EAAE,iFAAiF,CAAC,CAAA;YAC9I,MAAM,IAAA,kCAAqB,EAAC,IAAI,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC,CAAC;YAExE,OAAO,IAAA,uBAAe,EAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClC,IAAI,OAAO,KAAK,iBAAS,CAAC,WAAW,EAAE,CAAC;gBACtC,OAAO,IAAA,uBAAe,EAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,yBAAU,EAAC,IAAI,CAAC,KAAK,iBAAS,CAAC,WAAW,CAAC,CAAC,CAAA;YACvG,CAAC;YAED,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,YAAY,CAAC;gBACzC,OAAO,EAAE,0DAA0D;gBACnE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,oBAAY,EAAC,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,iBAAS,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAA,yBAAU,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACzI,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,uBAAe,EAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;CAAA;AAxBD,sDAwBC"}
|
|
@@ -4,4 +4,5 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./get-form-utils-directory"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./update-index"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./add-form-usage"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./get-app-name"), exports);
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/form/utils/index.ts"],"names":[],"mappings":";;;AAAA,qEAA2C;AAC3C,yDAA+B;AAC/B,2DAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../plugin/src/generators/form/utils/index.ts"],"names":[],"mappings":";;;AAAA,qEAA2C;AAC3C,yDAA+B;AAC/B,2DAAiC;AACjC,yDAA+B"}
|
|
@@ -22,7 +22,7 @@ function nextAppGenerator(tree, options) {
|
|
|
22
22
|
yield (0, generators_1.runAppEnvGenerator)(tree, options);
|
|
23
23
|
const shouldGenerateStoreLib = (yield (0, utils_1.askQuestion)('Do you want to create store lib? (y/n): ')) === 'y';
|
|
24
24
|
if (shouldGenerateStoreLib) {
|
|
25
|
-
(0,
|
|
25
|
+
yield (0, generators_1.runStoreGenerator)(tree, Object.assign(Object.assign({}, options), { baseGeneratorType: enums_1.BaseGeneratorType.NEXT_APP }));
|
|
26
26
|
}
|
|
27
27
|
const shouldGenerateApiClientLib = shouldGenerateStoreLib && (yield (0, utils_1.askQuestion)('Do you want to create api client lib? (y/n): ')) === 'y';
|
|
28
28
|
if (shouldGenerateApiClientLib) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/next-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,uCAQoB;AAEpB,2BAAgC;AAChC,4DAAyD;AACzD,8CAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/next-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,uCAQoB;AAEpB,2BAAgC;AAChC,4DAAyD;AACzD,8CAAuD;AACvD,wDAA8H;AAC9H,8CAA0E;AAC1E,6BAA6B;AAE7B,SAAsB,gBAAgB,CACpC,IAAU,EACV,OAA+B;;QAE/B,MAAM,OAAO,GAAG,QAAQ,OAAO,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,CAAC,OAAO,OAAO,CAAC,SAAS,EAAE,EAAE,UAAU,CAAC,CAAC;QAEtD,0BAA0B;QAC1B,IAAA,wBAAQ,EAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAEtD,IAAI,CAAC,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACzB,IAAA,wBAAQ,EACN,yBAAyB,OAAO,CAAC,IAAI,qBAAqB,OAAO,CAAC,SAAS,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,4HAA4H,EAClO,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;QACJ,CAAC;QAED,MAAM,IAAA,+BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAExC,MAAM,sBAAsB,GAAG,CAAA,MAAM,IAAA,mBAAW,E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EAAE,eAAe,CAAC,CAAC;QACxD,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;QAE/C,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACxD,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAC/C,IAAA,kBAAS,EAAC,IAAI,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;QACpD,CAAC;QAED,gBAAgB;QAChB,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,kCACrD,OAAO,KACV,UAAU,EAAV,kBAAU,IACV,CAAC;QAEH,IAAA,mBAAW,EAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAErC,mBAAmB;QACnB,IAAA,qCAA4B,EAAC,IAAI,EAAE,2BAAY,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;QAEjE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AAzED,4CAyEC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import React, { Fragment, ReactElement } from 'react';
|
|
1
|
+
import React, { <% if(withForwardRef) { %>forwardRef, ForwardedRef, <% } %>Fragment, ReactElement } from 'react';
|
|
2
2
|
|
|
3
|
-
interface <%=
|
|
3
|
+
interface <%= name %>Props {
|
|
4
4
|
// TODO: Describe props
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<% if(withForwardRef) { %>
|
|
8
|
+
export const <%= name %> = forwardRef(function Component(
|
|
9
|
+
props: <%= name %>Props,
|
|
10
|
+
ref: ForwardedRef<>, // TODO: add ref type
|
|
11
|
+
): ReactElement {
|
|
12
|
+
// TODO: Implement component
|
|
13
|
+
return <Fragment />;
|
|
14
|
+
});
|
|
15
|
+
<% } else { %>
|
|
16
|
+
export function <%= name %>(props: <%= name %>Props): ReactElement {
|
|
8
17
|
// TODO: Implement component
|
|
9
18
|
return <Fragment />;
|
|
10
19
|
}
|
|
20
|
+
<% } %>
|