Comments (7)
Interesting... so how would this work, like: redux g form SignUp --fields=firstName lastName email password
? Would this only be for the field names or how would it know that the input types should be of attribute "email" or "password" or "text"?
from redux-cli.
Yeah something along those lines would be nice. Maybe you would separte field names with their types like in a rails migration.
firstName:text email:email lastName:text age:number etc.
from redux-cli.
Ok, seems pretty straight forward then; so a complete command for this would include an optional --fields
flag with any number of <field name>:<input type>
arguments. In theory, this could look like:
redux g form <form name> --fields=<field name>:<input type>
where multiple fields are separated by spaces. Unless there's a cleaner way...
This might be a separate issue, but I think redux-cli needs to have some sort of validation for this in that if a form or component already exists, complain about it in the CLI instead of overwriting it (as well as making sure the syntax is correct for the including the field arguments). The overwriting of existing components has been a cumbersome issue I've experienced using this library. Nothing a revert of the local repo couldn't fix, but still...
from redux-cli.
Yeah I totally agree with the overwrite issues. If you want to try and tackle that I'd be open to a PR. I just started a new job though and need to learn Go and Angular at the moment so not sure how much free time I'll have to work on that for at least a few weeks.
from redux-cli.
Cool. I just wanted to create some ideas here for reference whenever I might have time to work on this...
Another idea, however, is to allow another flag for --validation=true
or something, which would create some simple validation logic around the user-defined fields during the generation process. That would be pretty cool... I would love to work on this when I have time, which isn't now unfortunately. But will leave these notes behind for future reference.
from redux-cli.
#110 will address this. And this issue will be closed when it is accepted
data will be able to be passed to blueprints that can use to do things like generate form fields for each attribute.
from redux-cli.
Merged #110 into the 2.0 master.
from redux-cli.
Related Issues (20)
- Implement an in memory file system to use in testing HOT 1
- Boilerplates and the new command HOT 3
- blueprint options HOT 5
- config command for cli HOT 2
- copy or clone command for cli HOT 6
- Adding prompts to blueprints HOT 4
- fileMapToken refactoring HOT 8
- Chat channel? HOT 2
- 2.0 default blueprints HOT 4
- blueprint injection or rerendering HOT 6
- asset blueprints
- eslint quotes avoidEscape HOT 2
- validate command for cli
- eslint fails for blueprints/blueprint/files/blueprints/name/index.js HOT 9
- Documentation for 2.0
- Use template-literal instead of EJS HOT 3
- Multiple and Alternate Templating Engines
- does the world need blueprints when it has Hygen? HOT 12
- Typescript Support
- How to integrate React-Router (v4.0.0) in this Cli
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-cli.