1.0.5 • Published 1 year ago

@darrylblake/create-component v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Create Component

A VERY opinionated command-line utility to generate scaffolding for a minimal TypeScript React component with an optional unit test, Storybook demo, and module SCSS file.

!NOTE
This is a work in progress and may change.

Usage

To generate a new component, use the following command:

create-component <ComponentName> [/optional/component/path]

Why?

I created this to reduce toil as I generally create the same scaffolding for the presentational components I create in the React projects I work in.

Installation

To install the create-component util globally, run:

npm install --global @darrylblake/create-component

!TIP You may want to customize this tool to better suit your needs.

To customize and develop this utility further, clone the repository locally:

git clone https://github.com/darrylblake/create-component.git
cd create-component/
npm install
npm link

Re-generate the "ExampleComponent" with:

npm run test

Output

You can find an example of the generated output here.

./ExampleComponent
├── index.ts
├── ExampleComponent.tsx
├── ExampleComponent.test.tsx
├── ExampleComponent.stories.tsx
└── ExampleComponent.module.scss
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago