Skip to content

Commit

Permalink
feat: Convert plop examples to ansi format
Browse files Browse the repository at this point in the history
  • Loading branch information
GulomovCreative committed Feb 20, 2024
1 parent 625093e commit 4b49ddd
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 64 deletions.
58 changes: 26 additions & 32 deletions docs/en/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,63 +128,57 @@ For those who want to add new documentation of the extra to the project, the [pl
:::
2. So you will run the CLI helper and you will see the following message. Use the [[↑]] and [[↓]] keys to select the desired language and press [[Enter]]:

```sh
$ plop
? Выберите язык / Choose language (Use arrow keys)
```ansi
? Выберите язык / Choose language (Use arrow keys)
Русский
> English
> English

```

3. Next, you will be asked to select a documentation template, there are two of them: **Single-page** and **Multi-page documentation**. Select the one you want and press [[Enter]].

```sh
$ plop
? Выберите язык / Choose language English
? Choose documentation template (Use arrow keys)
```ansi
? Выберите язык / Choose language English
? Choose documentation template (Use arrow keys)
Single-page documentation
> Multi-page documentation
[0;36m> Multi-page documentation[0m [0m[0m[0m
```

4. Now you need to give your extra a name and press [[Enter]] as well.

```sh
$ plop
? Выберите язык / Choose language English
? Choose documentation template Multi-page documentation
? Enter the component name
```ansi
? Выберите язык / Choose language English
? Choose documentation template Multi-page documentation
? Enter the component name │
```

5. Finally, you will need to select the language versions of the documentation. By using the [[↑]] and [[↓]] keys and pressing the [[Space]] you can mark the languages you need. Then press the [[Enter]] button.

```sh
$ plop
? Выберите язык / Choose language English
? Choose documentation template Multi-page documentation
? Enter the component name myFirstComponent
? Select the language versions of the documentation (Press <space> to select, <a> to toggle all, <i> to invert
selection, and <enter> to proceed)
( ) Русский
>(*) English
```ansi
? Выберите язык / Choose language Русский
? Choose documentation template Multi-page documentation
? Enter the component name myFirstComponent
? Выберите языковые версии документации (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
( ) Русский
>(*) English
```

6. **Done!** You will see something like this in the terminal. This means that the script has created the necessary structure, and you will have to fill out the documentation for your extra.

```sh
$ plop
? Выберите язык / Choose language English
? Choose documentation template Multi-page documentation
? Enter the component name myFirstComponent
? Select the language versions of the documentation English
✔ +! 8 files added
```ansi
? Выберите язык / Choose language Русский
? Choose documentation template Multi-page documentation
? Enter the component name myFirstComponent
? Select the language versions of the documentation English
✔ +! 8 files added
-> \docs\components\myfirstcomponent\events.md
-> \docs\components\myfirstcomponent\index.md
-> \docs\components\myfirstcomponent\quick-start.md
-> \docs\components\myfirstcomponent\interface\categories.md
-> \docs\components\myfirstcomponent\interface\items.md
-> \docs\components\myfirstcomponent\snippets\getcategories.md
-> \docs\components\myfirstcomponent\snippets\getitems.md
-> \docs\components\myfirstcomponent\snippets\index.md
Done in 1071.49s.
-> \docs\components\myfirstcomponent\snippets\index.md
```

::: tip TIP
Expand Down
58 changes: 26 additions & 32 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,63 +130,57 @@ VitePress также поставляет инструменты, украшаю
:::
2. Таким образом вы запустите CLI helper и увидите такую картину. Используя клавиши [[&uarr;]] и [[&darr;]] выберите нужный язык и нажмите [[Enter]]:

```sh
$ plop
? Выберите язык / Choose language (Use arrow keys)
> Русский
```ansi
? Выберите язык / Choose language (Use arrow keys)
> Русский
English

```

3. Далее вам будет предложено выбрать шаблон документации, их два: **Одностраничная** и **Многостраничная**. Выберите нужный и нажмите [[Enter]].

```sh
$ plop
? Выберите язык / Choose language Русский
? Выберите шаблон документации (Use arrow keys)
```ansi
? Выберите язык / Choose language Русский
? Выберите шаблон документации (Use arrow keys)
Одностраничная документация
> Многостраничная документация
[0;36m> Многостраничная документация[0m [0m[0m[0m
```

4. Теперь вам нужно ввести название вашего компонента и также нажать на [[Enter]].

```sh
$ plop
? Выберите язык / Choose language Русский
? Выберите шаблон документации Многостраничная документация
? Введите название компонента
```ansi
? Выберите язык / Choose language Русский
? Выберите шаблон документации Многостраничная документация
? Введите название компонента │
```

5. И наконец вам нужно будет выбрать языковые версии документации. Используя клавиши [[&uarr;]] и [[&darr;]] и нажатием на [[Пробел]] вы сможете отметить нужные вам языки. Затем нажмите на кнопку [[Enter]].

```sh
$ plop
? Выберите язык / Choose language Русский
? Выберите шаблон документации Многостраничная документация
? Введите название компонента myFirstComponent
? Выберите языковые версии документации (Press <space> to select, <a> to toggle all, <i> to invert
selection, and <enter> to proceed)
>(*) Русский
( ) English
```ansi
? Выберите язык / Choose language Русский
? Выберите шаблон документации Многостраничная документация
? Введите название компонента myFirstComponent
? Выберите языковые версии документации (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
>(*) Русский
( ) English
```

6. **Готово!** Вы увидите примерно такой вывод в терминале. Это значит, что скрипт для вас создал структуру из файлов и папок, а вам останется написать документацию для своего компонента.

```sh
$ plop
? Выберите язык / Choose language Русский
? Выберите шаблон документации Многостраничная документация
? Введите название компонента myFirstComponent
? Выберите языковые версии документации Русский
✔ +! 8 files added
```ansi
? Выберите язык / Choose language Русский
? Выберите шаблон документации Многостраничная документация
? Введите название компонента myFirstComponent
? Выберите языковые версии документации Русский
✔ +! 8 files added
-> \docs\components\myfirstcomponent\events.md
-> \docs\components\myfirstcomponent\index.md
-> \docs\components\myfirstcomponent\quick-start.md
-> \docs\components\myfirstcomponent\interface\categories.md
-> \docs\components\myfirstcomponent\interface\items.md
-> \docs\components\myfirstcomponent\snippets\getcategories.md
-> \docs\components\myfirstcomponent\snippets\getitems.md
-> \docs\components\myfirstcomponent\snippets\index.md
Done in 1071.49s.
-> \docs\components\myfirstcomponent\snippets\index.md
```

::: tip
Expand Down

0 comments on commit 4b49ddd

Please sign in to comment.