1.1.1 • Published 6 years ago
react-create-lib v1.1.1
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-libUsage
To create your library project:
- Open a terminal or command prompt
cdto the location where the library project is to be created.- 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.jsonAfter the project tree is created, the following steps are needed to install the dependencies required:
cdinto the project directory- Run
react-create-lib installand 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
.eslintrcrules in template - Added
@typescript-eslint/eslint-pluginto dependencies to install - Added
types.tstemplate file
- Updated