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

Aligned docs for changes in package generator #17051

Merged
merged 1 commit into from
Nov 4, 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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ An overview of the project's directory structure:
├─ ckeditor5-metadata.json # See link below for details.
├─ LICENSE.md # All created packages fall under the MIT license.
├─ package.json # See link below for details.
└─ README.md # Description of your project and usage instructions.
├─ README.md # Description of your project and usage instructions.
└─ vitest.config.js # Vitest configuration file.
```

<info-box warning>
Expand All @@ -59,6 +60,7 @@ Guides for developing some of the files:
* [.gitignore](https://git-scm.com/docs/gitignore)
* {@link framework/contributing/package-metadata ckeditor5-metadata.json}
* [package.json](https://docs.npmjs.com/cli/v7/configuring-npm/package-json)
* [vitest.config.js](https://vitest.dev/config/)

## Npm scripts

Expand Down Expand Up @@ -91,12 +93,7 @@ npm run start -- --language=de

### `test`

Allows executing unit tests for the package, specified in the `tests/` directory. The command accepts the following modifiers:

* `--coverage` &ndash; Creates the code coverage report.
* `--watch` &ndash; Observes the source files (the command does not end after executing tests).
* `--source-map` &ndash; Generates source maps of the sources.
* `--verbose` &ndash; Prints additional webpack logs.
Allows executing unit tests for the package specified in the `tests/` directory using [Vitest](https://vitest.dev/) testing framework. To check the code coverage, add the `--coverage` modifier. See other [CLI flags](https://vitest.dev/guide/cli.html) in Vitest.

Examples:

Expand All @@ -105,7 +102,18 @@ Examples:
npm run test

# Generate code coverage report after each change in the sources.
npm run test -- --coverage --test
npm run test -- --coverage --watch
```

### `test:debug`

Allows executing unit tests for the package specified in the `tests/` directory using [Vitest](https://vitest.dev/) testing framework with the possibility of debugging them. Once Vitest starts, it will stop execution and wait for you to open developer tools that can connect to Node.js inspector.

Examples:

```bash
# Execute tests in the debug mode.
npm run test:debug
```

### `lint`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ An overview of the project's directory structure:
├─ tsconfig.dist.json # Override for options from `tsconfig.json` file during `npm` and browser builds.
├─ tsconfig.test.json # Override for options from `tsconfig.json` file while executing tests.
├─ tsconfig.release.json # Override for options from `tsconfig.json` file during release process.
└─ README.md # Description of your project and usage instructions.
├─ README.md # Description of your project and usage instructions.
└─ vitest.config.ts # Vitest configuration file.

```

Expand All @@ -68,6 +69,7 @@ Guides for developing some of the files:
* [package.json](https://docs.npmjs.com/cli/v7/configuring-npm/package-json)
* [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
* augmentation.ts - Read more in the [relevant issue](https://github.com/ckeditor/ckeditor5/issues/13433), {@link module:core/plugincollection~PluginsMap} and {@link module:core/commandcollection~CommandsMap}.
* [vitest.config.js](https://vitest.dev/config/)

## Npm scripts

Expand Down Expand Up @@ -100,12 +102,7 @@ npm run start -- --language=de

### `test`

Allows executing unit tests for the package, specified in the `tests/` directory. The command accepts the following modifiers:

* `--coverage` &ndash; Creates the code coverage report.
* `--watch` &ndash; Observes the source files (the command does not end after executing tests).
* `--source-map` &ndash; Generates source maps of the sources.
* `--verbose` &ndash; Prints additional webpack logs.
Allows executing unit tests for the package specified in the `tests/` directory using [Vitest](https://vitest.dev/) testing framework. To check the code coverage, add the `--coverage` modifier. See other [CLI flags](https://vitest.dev/guide/cli.html) in Vitest.

Examples:

Expand All @@ -114,7 +111,18 @@ Examples:
npm run test

# Generate code coverage report after each change in the sources.
npm run test -- --coverage --test
npm run test -- --coverage --watch
```

### `test:debug`

Allows executing unit tests for the package specified in the `tests/` directory using [Vitest](https://vitest.dev/) testing framework with the possibility of debugging them. Once Vitest starts, it will stop execution and wait for you to open developer tools that can connect to Node.js inspector.

Examples:

```bash
# Execute tests in the debug mode.
npm run test:debug
```

### `lint`
Expand Down