@ronas-it/nx-generators 0.4.0 → 0.4.1

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.
Files changed (2) hide show
  1. package/README.md +45 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,11 @@ NX generators for Ronas IT projects.
7
7
  1. Create monorepo with Expo app using [NX Expo preset](https://nx.dev/nx-api/expo) or with Next.js app using [NX Next preset](https://nx.dev/nx-api/next):
8
8
 
9
9
  ```sh
10
+ # For Expo app:
10
11
  npx create-nx-workspace@latest my-project --preset=expo --appName=my-app --e2eTestRunner=none --ci=skip
12
+
13
+ # For Next.js app:
14
+ npx create-nx-workspace@latest my-project --preset=next --appName=my-app --nextAppDir=true --nextSrcDir=false --style=scss --e2eTestRunner=none --ci=skip
11
15
  ```
12
16
 
13
17
  2. Install this package:
@@ -21,13 +25,22 @@ npm i @ronas-it/nx-generators --save-dev
21
25
  ```sh
22
26
  npx nx g repo-config
23
27
  npx nx g code-checks
24
- npx nx g expo-app // for Expo app
28
+
29
+ # For Expo app:
30
+ npx nx g expo-app
31
+
32
+ # For Next.js app:
33
+ npx nx g next-app
25
34
  ```
26
35
 
27
36
  Or run all generators at once:
28
37
 
29
38
  ```sh
39
+ # For Expo app:
30
40
  npx nx g repo-config && npx nx g code-checks && npx nx g expo-app
41
+
42
+ # For Next.js app:
43
+ npx nx g repo-config && npx nx g code-checks && npx nx g next-app
31
44
  ```
32
45
 
33
46
  4. Start the app:
@@ -55,15 +68,15 @@ Configures code checks and formatting with pre-commit hook.
55
68
 
56
69
  ### 3. `expo-app`
57
70
 
58
- Generates and configures Expo React Native app.
71
+ Generates and configures an Expo React Native app.
59
72
 
60
- ### Options
73
+ #### Options
61
74
 
62
- 1. `name` (optional) - name of the app for `app.config.ts` (e.g: my-app)
75
+ 1. `name` (optional) - name of the app for `app.config.ts` (e.g: `my-app`)
63
76
 
64
- 2. `directory` (optional) - name of the directory in the `apps/` folder (e.g: mobile)
77
+ 2. `directory` (optional) - name of the directory in the `apps/` folder (e.g: `mobile`)
65
78
 
66
- ### Example
79
+ #### Example
67
80
 
68
81
  ```sh
69
82
  npx nx g expo-app --name=my-app --directory=mobile
@@ -73,11 +86,31 @@ or
73
86
  npx nx g expo-app my-app mobile
74
87
  ```
75
88
 
76
- ### 4. `react-lib`
89
+ ### 4. `next-app`
90
+
91
+ Generates and configures a Next.js app.
92
+
93
+ #### Options
94
+
95
+ 1. `name` (optional) - name of the app (e.g: `my-app`)
96
+
97
+ 2. `directory` (optional) - name of the directory in the `apps/` folder (e.g: `web`)
98
+
99
+ #### Example
100
+
101
+ ```sh
102
+ npx nx g next-app --name=my-app --directory=web
103
+ ```
104
+ or
105
+ ```sh
106
+ npx nx g next-app my-app web
107
+ ```
108
+
109
+ ### 5. `react-lib`
77
110
 
78
111
  Generates a library according to [NX notation](https://nx.dev/concepts/more-concepts/applications-and-libraries).
79
112
 
80
- ### Options
113
+ #### Options
81
114
 
82
115
  1. `directory` (optional) - directory for the library (e.g. mobile/account/features/profile-settings)
83
116
 
@@ -85,7 +118,7 @@ Generates a library according to [NX notation](https://nx.dev/concepts/more-conc
85
118
 
86
119
  3. `dryRun` (optional) - generate the library without creating files
87
120
 
88
- ### Example
121
+ #### Example
89
122
 
90
123
  ```sh
91
124
  npx nx g react-lib --directory=mobile/account/features/profile-settings --withComponent --dryRun
@@ -95,17 +128,17 @@ or
95
128
  npx nx g react-lib mobile/account/features/profile-settings --withComponent --dryRun
96
129
  ```
97
130
 
98
- ### 5. `react-component`
131
+ ### 6. `react-component`
99
132
 
100
133
  Creates a React component in particular library.
101
134
 
102
- ### Options
135
+ #### Options
103
136
 
104
137
  1. `name` (optional) - name of the component (e.g. AppButton)
105
138
 
106
139
  2. `subcomponent` (optional) - generate a folder for components
107
140
 
108
- ### Example
141
+ #### Example
109
142
 
110
143
  ```sh
111
144
  npx nx g react-component --name=AppButton --subcomponent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ronas-it/nx-generators",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "NX generators for Ronas IT projects",
5
5
  "license": "MIT",
6
6
  "author": "Ronas IT",