1.2.4 • Published 3 years ago

@ryands17/rcomp v1.2.4

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

rcomp CLI

A CLI for generating React Components.

Commands

  • rcomp create component or rcomp c component will generate a component in the components folder of src by default
  • rcomp create page or rcomp c page will generate a page / route in the pages folder of src by default

Currently this plugin supports 2 options: 1. Creating a function or class Component 2. Creating a scss or styled-component file

Configuration options

  • You can specify the following configuration in your package.json. Default values for all are shown below
"rcomp": {
  "componentsDirectory": "components",
  "pagesDirectory": "pages",
  "createStories": false,
  "outputExtension": "js"
}
  • componentsDirectory: The custom folder for components
  • pagesDirectory: The custom folder for pages
  • createStories: If you want to generate stories for your component (if using Storybook)
  • outputExtension: The generated extension for your project (.js or .ts)

Note: The base directory will be src though.

License

MIT - see LICENSE

Enhancements

  • Write robust tests!
  • Read components and pages folder from project config (currently statically set to components and pages)
  • Add support for .ts/.tsx

Changelog

Version 1.1.2

  • Fix an issue where the users' custom config was not imported

Version 1.0.3

  • Add support for generating stories for components (if using Storybook)

Version 1.0.2

  • Add support for the .ts/.tsx extension
1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.1.2

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago