Skip to content

Commit d00bdbb

Browse files
Update README.md
1 parent f5b0ae4 commit d00bdbb

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,23 @@ npm install -g react-modules-template
88

99
## Usage
1010
```
11+
react-module <ComponentName> [--pure]
12+
```
13+
14+
#### Example
15+
```
1116
react-module Login
1217
```
1318

1419
This will generate a Folder named Login relative to your current path
1520
and three files: an empty Login.scss and another file named Login.jsx filled with
1621
starter code for exporting a module with custom css.
1722

18-
### Configuration
23+
If you would like to generate a stateless component you can pass in the `--pure` flag after the componentName, this flag is optional. E.g: `react-module TableRow --pure`, this will generate a pure function with the name of TableRow with a corresponding style file and a test file.
24+
25+
### Get started
26+
27+
Install the package globally and then run the `--init` command below.
1928
```
2029
react-module --init
2130
```
@@ -24,6 +33,9 @@ This will step you through some configuration questions to make this package cre
2433

2534
## Changelog
2635

36+
#### v3.1.0
37+
Added the `--pure` flag to generate stateless components.
38+
2739
#### v3.0.0
2840
Changed the main file to be named index.extension instead of componentName.extension, because I hated that I had to import it like this `import component from '/component/component'`.
2941
Now I can only import it like this: `import component from '/component'`
@@ -38,7 +50,7 @@ Added a jest .js test file, the starter code only checks that it can be rendered
3850
## Output
3951
```
4052
./Login
41-
--- index.jsx
53+
--- index.[js|jsx]
4254
--- Login.test.js
43-
--- Login.scss
44-
```
55+
--- Login.[scss|css]
56+
```

0 commit comments

Comments
 (0)