ushajindi-add v1.0.5
CLI tool for quickly creating React components.
Installation
To install react-ac globally in your project, run the following command:
npm install -g ushajindi-addUsage
After installation, you can use react-ac to create new React components. The tool supports parameters to customize the created component.
npm ushajindi-add -c MyComponent -f ts -s scssParameters
-c, --component : Name of the component to create (required). -f, --flag : Flag to choose TypeScript (ts) or JavaScript (js) (required). -s, --style : Flag to choose styles (scss, css) (required). -sm, --styleModule : Flag to choose styles in module mode (specify or <у>)
ushajindi-add -c Header -f js -s css -sm yesushajindi-add -c Header -f js -s css -sm yesExample
Suppose you want to create a TypeScript component named MyComponent with SCSS styles. Run the following command:
ushajindi-add -c MyComponent -f ts -s scssThis will create the component structure in the ./src/Components/MyComponent folder, including the MyComponent.tsx and MyComponent.scss files.
Инструмент командной строки для быстрого создания компонентов React.
Установка
Для установки ushajindi-add глобально в вашем проекте выполните следующую команду:
npm install -g ushajindi-addИспользование
После установки вы можете использовать react-ac для создания новых компонентов React. Инструмент поддерживает параметры для настройки создаваемого компонента.
ushajindi-add -c MyComponent -f ts -s scssПараметры:
-c, --component : Имя создаваемого компонента (обязательно). -f, --flag : Флаг для выбора TypeScript (ts) или JavaScript (js) (обязательно). -s, --style : Флаг для выбора стилей (scss, css) (обязательно). -sm, --styleModule : Флаг для выбора стилей в режиме модуля (указывайте или <у>). Примеры использования:
ushajindi-add -c MyComponent -f ts -s scss
ushajindi-add -c Header -f js -s css -sm yesПример
Предположим, вы хотите создать TypeScript-компонент с именем MyComponent и стилями SCSS. Выполните следующую команду:
ushajindi-add -c MyComponent -f ts -s scssЭто создаст структуру компонента в папке ./src/Components/MyComponent, включая файлы MyComponent.tsx и MyComponent.scss.