View Code? Open in Web Editor
NEW
No more clicking around to create files in your react project! Awesome React Generator is Command Line Tool that let's you scaffold your components without leaving your terminal.
License: MIT License
awesome-react-generator's People
awesome-react-generator's Issues
I am suggesting a type of typescript and as well as it's good to have this for js also.
components with useStyle using react material-ui.
As an example, there should be a folder like SignIn
. In this folder there should be two files index.tsx
with below content
import React from "react" ;
import { useStyles } from "./useStyles" ;
const StudentProfile : React . FC < any > = () => {
const classes = useStyles ( ) ;
return (
< div > Working< / div >
) ;
} ;
export default SignIn ;
and a file useStyles.tsx
with below starting code
import { makeStyles } from "@material-ui/core/styles" ;
export const useStyles = makeStyles ( ( theme ) => ( {
} ) ) ;
Right now cli tool generates typescript files but the boilerplate is not typescript.
We have to update typescript templates in the templates folder.
In this template:
importCssLine = `import Classes from "./${ pascalCaseName } .module.${ css } ";\n` ;
The css module is imported with the name Classes
In the CSS modules docs they use the word styles
. Why was the name Classes
chosen?
To keep consistent with more people's code, I propose we change it to styles
as a default and add an option to change the name.
I am suggesting a type of typescript and as well as it's good to have for js also
Is it extendable?
Can I add extra templates or override current?
Which template engine is used?
Can I make templates for style/test file?
Can I override some of CLI params? For example, I want test files to be generated each time
Right now, component command only generates a js
file and a css
file. An optional argument can be given with command, for instance:
rg component rfc hello-world --test
that will generate a test file also.