CLI tool for quickly creating React components.
To install react-ac
globally in your project, run the following command:
npm install -g ushajindi-add
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 scss
-c, --component : Name of the component to create (required). -f, --flag : Flag to choose TypeScript (ts) or JavaScript (js) (required). -s, --style <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 yes
ushajindi-add -c Header -f js -s css -sm yes
Suppose you want to create a TypeScript component named MyComponent with SCSS styles. Run the following command:
ushajindi-add -c MyComponent -f ts -s scss
This 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 <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.