Skip to content

Commit

Permalink
fix: allow functional component
Browse files Browse the repository at this point in the history
  • Loading branch information
jepser committed May 5, 2019
1 parent ce12d60 commit 22050d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ I created this package to easily create React components, unifying the way we cr
# Options
- `--class`: to create a class component
- `--pure`: to create a pure component
- `--func`: (default) to create a functional component
- `--help`: list the options

## Conventions
Expand Down
4 changes: 3 additions & 1 deletion src/mkcomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ const parseArgsToOptions = (rawArgs) => {
const args = arg({
'--class': Boolean,
'--pure': Boolean,
'--func': Boolean,
'--help': Boolean,
'-c': '--class',
'-p': '--pure'
'-p': '--pure',
'-f': '--func'
}, {
argv: rawArgs.slice(2),
})
Expand Down

0 comments on commit 22050d2

Please sign in to comment.