5.0.1 ā€¢ Published 3 years ago

@dbenfouzari/cli-tools v5.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

āš ļø This package is now deprecated in favor of @dbenfouzari/cli It will be removed in a future release

@dbenfouzari/cli-tools

Liens directs

Installation

yarn add -D @dbenfouzari/cli-tools

or if you are using npm

npm i -D @dbenfouzari/cli-tools

Usage

After installing it, it grants you 3 commands

generate-react-component

This command will generate a React component based on your request.

> yarn generate-react-component

? What is the component name ? test-react
? Select a target directory src/components/
āœØ  Done in 4.24s.

The output will be

šŸ“¦ src
 ā”£ šŸ“‚ components
 ā”ƒ ā”£ šŸ“‚ test-react
 ā”ƒ ā”ƒ ā”£ šŸ“œ index.ts
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-react.modules.scss
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-react.stories.tsx
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-react.test.tsx
 ā”ƒ ā”ƒ ā”— šŸ“œ test-react.tsx
 ā”— ...

generate-native-component

This command will generate a React-Native component based on your request.

> yarn generate-native-component

? What is the component name ? test-native
? Select a target directory src/components/
āœØ  Done in 3.15s.

The result will be

šŸ“¦ src
 ā”£ šŸ“‚ components
 ā”ƒ ā”£ šŸ“‚ test-native
 ā”ƒ ā”ƒ ā”£ šŸ“œ index.ts
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-native.stories.tsx
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-native.test.tsx
 ā”ƒ ā”ƒ ā”— šŸ“œ test-native.tsx
 ā”— ...

generate-component

This command will prompt you with an app type choice, then execute above command accordingly.

yarn generate-component

? What is your app type ? (Use arrow keys)
āÆ React
  React-Native

? What is the component name ? test-component
? Select a target directory src/components/
āœØ  Done in 32.19s.

The output will be

šŸ“¦ src
 ā”£ šŸ“‚ components
 ā”ƒ ā”£ šŸ“‚ test-component
 ā”ƒ ā”ƒ ā”£ šŸ“œ index.ts
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-component.module.scss
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-component.stories.tsx
 ā”ƒ ā”ƒ ā”£ šŸ“œ test-component.test.tsx
 ā”ƒ ā”ƒ ā”— šŸ“œ test-component.tsx
 ā”— ...