solti
v1.1.3
Published
Solti is an cli tool to generate React & Vue Component decorated with patterns that are widely used and mostly taken from site [React Patterns](https://reactpatterns.com/) and others.
Downloads
1
Readme
Solti
Solti is an cli tool to generate React & Vue Component decorated with patterns that are widely used and mostly taken from site React Patterns and others.
Some of the patterns used in React (Checked are available):
- [x] Simple Component
- [x] Higher-order component
- [x] Stateless function
- [x] JSX spread attributes
- [x] Destructuring arguments
- [ ] Conditional rendering
- [ ] Children types
- [ ] Array as children
- [ ] Function as children
- [ ] Render callback
- [ ] Children pass-through
- [ ] Proxy component
- [ ] Style component
- [ ] Event switch
- [x] Layout component
- [ ] Container component
- [ ] State hoisting
- [x] Controlled input
Some of the patterns used in Vue (Checked are available):
- [x] Simple Component
- [x] Functional Component
Install
NPM
npm i -g solti
Yarn
yarn global add solti
Usage
From your project on any location you can run solti
on your terminal
which will ask some simple questions:
Please select available react component patterns
This will be the pattern you want to use. [Default: Higher order]
Please select available react component patterns
This will be the pattern you want to use. [Default: Higher order]
Enter component name
Name of your component [Default: Random name]
Q3: Add props separated by coma or leave blank
[Default: null]. If you want to add props to your component then enter props separated by coma
Q4: Add Prop Types
Should solti
add prop types validation also. [Default: Yes]
Q5: Enter destination for component relative from current location
This will be location where component will be place and should be default from where solti
is running. [Default: Current Location]
Options
--with-docs
: Will generate component with available documentation on top of every component.