Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: describe --lang arg #24

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/en/create-hermione-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ Use `create-hermione-app` to set up [hermione](https://github.com/gemini-testing

## Usage

```bash
npx create-hermione-app my-app
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Убрал из README.md npx из-за его проблем с кэшированием

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно проверить с приставкой @latest - у меня так работает

```

or via `npm init`:

```bash
npm init hermione-app my-app
```
Expand All @@ -22,7 +16,11 @@ If you already have a project at given path, the tool will try to guess used pac

### No questions mode

You can add `-y` or `--yes` argument to launch a tool in *no-questions* mode.
You can add `-y` or `--yes` argument to launch a tool in *no-questions* mode:

```bash
npm init hermione-app my-app -- -y
```

In this mode you won't be asked questions about desired plugins and packet manager.

Expand All @@ -31,6 +29,16 @@ Default packet manager, used with `--yes` argument: `npm`
Default plugins, installed with `--yes` argument:
- [html-reporter](https://github.com/gemini-testing/html-reporter)

### Lang

By default, create-hermione-app sets up project with typescript tests support.

You can opt-out of typescript by adding `--lang js` argument:

```bash
npm init hermione-app my-app -- --lang js
```

## List of proposed plugins

- [Global Hook](https://github.com/gemini-testing/hermione-global-hook) - To add global 'beforeEach' and 'afterEach' functions
Expand Down
16 changes: 10 additions & 6 deletions docs/ru/create-hermione-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@

## Использование

```bash
npx create-hermione-app my-app
```

Или через `npm init`:

```bash
npm init hermione-app my-app
```
Expand All @@ -31,6 +25,16 @@ npm init hermione-app my-app
Плагины по умолчанию, устанавливаемые с аргументом `--yes`:
- [html-reporter](https://github.com/gemini-testing/html-reporter)

### Язык

По умолчанию create-hermione-app настраивает проект с поддержкой typescript тестов.

Вы можете отказаться от использования typescript, добавив аргумент `--lang js`:

```bash
npm init hermione-app my-app -- --lang js
```

## Список предлагаемых плагинов

- [Global Hook](https://github.com/gemini-testing/hermione-global-hook) - Чтобы вынести общую логику из своих тестов в специальные обработчики для `beforeEach` и `afterEach` хуков
Expand Down
2 changes: 1 addition & 1 deletion src/bin/create-hermione-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ const argv = yargs(hideBin(process.argv))
.parse();

const argvOpts = optsFromArgv(argv as ToolArgv);
const createOpts = (defaultOpts: DefaultOpts): ToolOpts => Object.assign(argvOpts, defaultOpts);
const createOpts = (defaultOpts: DefaultOpts): ToolOpts => ({ ...defaultOpts, ...argvOpts });
Copy link
Member Author

@KuznetsovRoman KuznetsovRoman Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут js затиралось дефолтным ts

launcher.run({ createOpts });
Loading