1.1.1 • Published 5 years ago

react-create-lib v1.1.1

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

react-create-lib

A global CLI that creates a project for a react typescript library. It also sets up Storybook for previewing your component and Rollup for bundling all files into a single distribution file (dist/bundle.js)

Install

npm i -g react-create-lib

Usage

To create your library project:

  1. Open a terminal or command prompt
  2. cd to the location where the library project is to be created.
  3. Run react-create-lib -l <library-name>

This will create a project tree which looks like

<library-name>
    |
    |--.storybook/
       |--main.js
       |--preview-head.html
    |--dist/
       |--index.d.ts
    |--src/
       |--index.ts
    |--.babelrc.js
    |--.eslintrc
    |--.gitignore
    |--.npmignore
    |--.prettierrc
    |--package.json
    |--README.md
    |--rollup.config.js
    |--tsconfig.json

After the project tree is created, the following steps are needed to install the dependencies required:

  1. cd into the project directory
  2. Run react-create-lib install and wait for the installation to complete

If no errors occur, you are now ready to open the project in your IDE (IntelliJ, VSCode, Atom, etc) and begin development.

Changelog

  • 1.1.0
    • Updated .eslintrc rules in template
    • Added @typescript-eslint/eslint-plugin to dependencies to install
    • Added types.ts template file
1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago