New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

init-hooks-src

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

init-hooks-src

create react src template files with hooks version

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

init-hooks-src

install using npm:

npm install --save-dev init-hooks-src

or yarn:

yarn add --dev init-hooks-src

Create a file with name is menu.json in the root directory of your project, like this:

{
  "menu": ["example", "orderList", "dashboard", "home", "cashCar"]
}

then just: init-hooks-src

press enter to use default path './menu.json' and dist './src' or input dir to set path and dist

or

init-hooks-src --path ./menu1.json --dist ./src1

Before run init-hooks-src, for example, your project structure may be like:

.
├── webpack.config.js
├── .gitignore
├── .babelrc
├── package.json
├── README.md
├── menu.json

After run init-hooks-src, it will help you make some containers and service api correspond to it, so the structure would be:

├── webpack.config.js
├── .gitignore
├── .babelrc
├── package.json
├── src
│   ├── container
│   │   ├── CashCar
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   ├── Dashboard
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   ├── Example
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   ├── Home
│   │   │   ├── enum.js
│   │   │   └── index.js
│   │   └── OrderList
│   │       ├── enum.js
│   │       └── index.js
│   ├── hooks
│   │   ├── useForceUpdate.js
│   │   └── useReactRouter.js
│   ├── index.js
│   ├── routes.js
│   ├── service
│   │   ├── api.js
│   │   ├── cashCar.js
│   │   ├── dashboard.js
│   │   ├── example.js
│   │   ├── home.js
│   │   └── orderList.js
│   └── store
│       └── index.js
├── README.md
├── menu.json

Now, you can delete menu.json, and start your code!

Keywords

react

FAQs

Package last updated on 04 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts