3.0.2 • Published 7 years ago

cra-generate v3.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

create-react-app Component Generator

Scaffold a React component for Create React App.

Usage: cra-generate [options] <component>

Options:

  -h, --help                 output usage information
  -V, --version              output the version number
  -f, --functional           create a functional component
  -c, --css-extension [ext   specify the extension of generated css files
  -d, --directory [dir]      specify a directory for the component
  --no-semi                  remove semicolons

If a .flowconfig is present, a // @flow comment is prepended to all script files.

Project specific settings can be added to the package.json file under the craGenerate key. Eg

"craGenerate": {
  "fileFormat": "paramCase",
  "cssExtension": "scss",
  "directory": "widgets"
}
optiontypedefaultdescription
directorystring"components"Where, relative to the ./src/ directory, the component should be.
fileFormatstring"pascalCase"One of: camelCase, constantCase, headerCase, paramCase, pascalCase or snakeCase.
componentFormatstring"pascalCase"One of: camelCase, constantCase, headerCase, paramCase, pascalCase or snakeCase.
typeCheckundefined|stringundefinedCan be set explicitly to "flow".
cssExtensionstring"css"File extensions, with or without a dot.
semitrue|falsetrueShould script files be terminated with a semicolon.
testfalse|string"jest"Only jest for now. Can be skipped with false.

License

MIT

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago