Skip to content

Commit 886d913

Browse files
Merge pull request #24 from gemini-testing/HERMIONE-1398.js
docs: describe --lang arg
2 parents 4948936 + f17d15c commit 886d913

3 files changed

Lines changed: 26 additions & 14 deletions

File tree

docs/en/create-hermione-app.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ Use `create-hermione-app` to set up [hermione](https://github.com/gemini-testing
44

55
## Usage
66

7-
```bash
8-
npx create-hermione-app my-app
9-
```
10-
11-
or via `npm init`:
12-
137
```bash
148
npm init hermione-app my-app
159
```
@@ -22,7 +16,11 @@ If you already have a project at given path, the tool will try to guess used pac
2216

2317
### No questions mode
2418

25-
You can add `-y` or `--yes` argument to launch a tool in *no-questions* mode.
19+
You can add `-y` or `--yes` argument to launch a tool in *no-questions* mode:
20+
21+
```bash
22+
npm init hermione-app my-app -- -y
23+
```
2624

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

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

32+
### Lang
33+
34+
By default, create-hermione-app sets up project with typescript tests support.
35+
36+
You can opt-out of typescript by adding `--lang js` argument:
37+
38+
```bash
39+
npm init hermione-app my-app -- --lang js
40+
```
41+
3442
## List of proposed plugins
3543

3644
- [Global Hook](https://github.com/gemini-testing/hermione-global-hook) - To add global 'beforeEach' and 'afterEach' functions

docs/ru/create-hermione-app.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

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

7-
```bash
8-
npx create-hermione-app my-app
9-
```
10-
11-
Или через `npm init`:
12-
137
```bash
148
npm init hermione-app my-app
159
```
@@ -31,6 +25,16 @@ npm init hermione-app my-app
3125
Плагины по умолчанию, устанавливаемые с аргументом `--yes`:
3226
- [html-reporter](https://github.com/gemini-testing/html-reporter)
3327

28+
### Язык
29+
30+
По умолчанию create-hermione-app настраивает проект с поддержкой typescript тестов.
31+
32+
Вы можете отказаться от использования typescript, добавив аргумент `--lang js`:
33+
34+
```bash
35+
npm init hermione-app my-app -- --lang js
36+
```
37+
3438
## Список предлагаемых плагинов
3539

3640
- [Global Hook](https://github.com/gemini-testing/hermione-global-hook) - Чтобы вынести общую логику из своих тестов в специальные обработчики для `beforeEach` и `afterEach` хуков

src/bin/create-hermione-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ const argv = yargs(hideBin(process.argv))
2626
.parse();
2727

2828
const argvOpts = optsFromArgv(argv as ToolArgv);
29-
const createOpts = (defaultOpts: DefaultOpts): ToolOpts => Object.assign(argvOpts, defaultOpts);
29+
const createOpts = (defaultOpts: DefaultOpts): ToolOpts => ({ ...defaultOpts, ...argvOpts });
3030
launcher.run({ createOpts });

0 commit comments

Comments
 (0)