1.0.6 • Published 10 months ago

grosh-cli v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

CLI grosh-cli

boosty Вы можете поддержать меня на Boosty

grosh-cli это cli для быстрой генерации файлов в React приложении

Usage

grosh-cli generate <name of directory> <name of file>

Subcommands

используйте --style чтобы указать расширения вашего css (по дефолиту используется scss) например:

grosh-cli generate components header --style css

используйте --language чтобы указать расширения вашего ЯП (по дефолиту используется ts) например:

grosh-cli generate components header --language js

Installation

npm install -g grosh

Example

У нас есть базовая структура нашего react приложения, мы находимся в корне проекта.

📦react-project-name
┣ 📂src
┣ 📂node_modules
┣ 📜.gitignore
┣ 📜package-lock.json
┗ 📜package.json

Введем команду в терминале

grosh-cli generate components header

Результат будет следующий

📦react-project-name
 ┣ 📂src
 ┃ ┣ 📂components
 ┃   ┗ 📂header
 ┃     ┣ 📜index.ts
 ┃     ┣ 📜Header.tsx
 ┃     ┗ 📜Header.scss
 ┣ 📂node_modules
 ┣ 📜.gitignore
 ┣ 📜package-lock.json
 ┗ 📜package.json

Header.tsx

import React from "react";

import "./Header.scss";

export const Header = () => (<></>);

index.ts

export { Header } from "./Header";

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am "Add some feature")
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
1.0.6

10 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago