@mnvsh/create-component
v1.0.1
Published
Scaffold React components with optional barrel files and props types.
Readme
create-component
A small CLI that scaffolds React components into src/components/<Name>,
with interactive (or flag-driven) choices for a barrel file and an empty
props type. Supports creating multiple components in one command.
Usage
cc Accordion
cc Accordion Modal Tooltip
cc Accordion --no-barrel
cc Accordion --no-props
cc Accordion Modal --defaultsOne-time setup (per machine)
Log in to npm (only needed once per machine):
npm loginRename the package in
package.json(namefield) to your own scope, e.g.@yourusername/create-component.Publish it (scoped packages need
--access publicon a free npm account — private/restricted publishing requires a paid plan):npm publish --access public
Install (once per machine, not per project)
bun add -g @yourusername/create-componentThat's it — cc is now a global command. Run it from inside any project:
cd ~/projects/some-app
cc AccordionNo per-project install, no .npmrc, no alias.
Updating
Whenever you change the script:
npm version patch
npm publish --access publicThen on any machine:
bun add -g @yourusername/create-component@latest