You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -141,17 +141,17 @@ We use babel to transpile code in both server and client with `stage-0` plugin.
141
141
142
142
### Make your MERN
143
143
In this version, we enabled the `mern-cli` to clone not only this project but also the variants of `mern-starter` like one project with MaterialUI or JWT auth. To make your version of MERN, follow these steps
2) Make your changes. Add a package, add authentication, modify the file structure, replace Redux with MobX or anything else.
149
-
3) In this version, we also added code generators. Blueprints for those generators are located at `config/blueprints`, and config is located at `mern.json`. Make sure to edit them if necessary after your made modifications in the previous step. There is a section below which explains how to modify generators.
150
-
4) Next clone `mern-cli` project
148
+
2. Make your changes. Add a package, add authentication, modify the file structure, replace Redux with MobX or anything else.
149
+
3. In this version, we also added code generators. Blueprints for those generators are located at `config/blueprints`, and config is located at `mern.json`. Make sure to edit them if necessary after your made modifications in the previous step. There is a section below which explains how to modify generators.
150
+
4. Next clone `mern-cli` project
151
151
```
152
152
git clone https://github.com/Hashnode/mern-cli
153
153
```
154
-
5) Add your project details to `variants.json` in the cloned project and send a pull request.
154
+
5. Add your project details to `variants.json` in the cloned project and send a pull request.
155
155
156
156
### Modifying Generators
157
157
@@ -172,13 +172,13 @@ It contains a blueprints array. Each object in it is the config for a generator.
172
172
```
173
173
174
174
A file object contains
175
-
1) `blueprint-path` - location of the blueprint file
176
-
2) `target-path` - location where the file should be generated
177
-
3) `parent-path` - optional parameter, used if you want to generate the file inside an already existing folder in your project.
175
+
1. `blueprint-path` - location of the blueprint file
176
+
2. `target-path` - location where the file should be generated
177
+
3. `parent-path` - optional parameter, used if you want to generate the file inside an already existing folder in your project.
178
178
179
179
`target-path` supports [ejs](https://github.com/mde/ejs) and the following variables will be passed while rendering,
180
-
1) `name` - `<component-name>` input from user
181
-
2) `parent` - in particular special cases where you need to generate files inside an already existing folder, you can obtain this parent variable from the user. A config using that will look like,
180
+
1. `name` - `<component-name>` input from user
181
+
2. `parent` - in particular special cases where you need to generate files inside an already existing folder, you can obtain this parent variable from the user. A config using that will look like,
182
182
```
183
183
{
184
184
"name": "dumb-m",
@@ -194,7 +194,7 @@ A file object contains
194
194
}
195
195
```
196
196
Here, notice the usage. In `<module-name>/<component-name>`, `<module-name>` will be passed as `parent` and `<component-name>` will be passed as `<name>`.
197
-
3) `helpers` - an helper object is passed which include common utility functions. For now, it contains `capitalize`. If you want to add more, send a PR to [mern-cli](https://github.com/Hashnode/mern-cli).
197
+
3. `helpers` - an helper object is passed which include common utility functions. For now, it contains `capitalize`. If you want to add more, send a PR to [mern-cli](https://github.com/Hashnode/mern-cli).
198
198
199
199
#### Blueprint files
200
200
Blueprints are basically [ejs](https://github.com/mde/ejs) templates which are rendered with the same three variables(`name`, optional `parent` and `helpers` object) as above.
0 commit comments