hooks-cli
v1.0.4
Published
CLI for scaffolding React hooks
Downloads
2
Readme
hooks-cli
Opinionated CLI for scaffolding React hooks.
This CLI was made by following Dominik Kundel tutorial
Table of Contents
Getting started
sudo npm install -g hooks-cli
Usage
Create
mkdir my-custom-hook
cd my-custom-hook
create-hook
Initialize a git repository
create-hook -g
or
create-hook --git
Develop
Go to your package.json
and uncomment the files
property.
npm start
This will run a demo locally at localhost:3000
using webpack.demo.js
Distribute
npm publish --access public
Reference
This will use webpack.config.js
Update the externals
object if you add more peerDependencies
. By default React
is included.
Structure
my-custom-hook
├── LICENCE
├── README.md
├── node_modules
├── package.json
├── package-lock.json
├── postcss.config.js
├── webpack.config.js
├── webpack.demo.js
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .prettierignore
├── .prettierrc
├── demo
│ ├── styles
│ │ ├── index.scss
│ │ ├── tailwind.css
│ │ └── variables.scss
│ ├── App.jsx
│ ├── index.html
│ └── index.jsx
└── src
└── index.js
Includes
- Eslint
- Prettier
- Webpack
- Tailwindcss (only for demo)
License
hooks-cli is MIT licensed.