GithubHelp home page GithubHelp logo

darrylblake / create-component Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 42 KB

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

TypeScript 13.19% JavaScript 69.59% Handlebars 15.82% SCSS 1.40%

create-component's Introduction

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

create-component's People

Contributors

darrylblake avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.