Skip to content

Commit

Permalink
Grammar, language and some more info on install
Browse files Browse the repository at this point in the history
  • Loading branch information
Isengo1989 committed Jan 27, 2025
1 parent fcd0726 commit 324a32c
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 37 deletions.
4 changes: 2 additions & 2 deletions products/cli/extension-commands/admin-watcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ nav:
`shopware-cli extension admin-watch` can be different to the regular Admin Watcher. You can start the regular Admin Watcher with `shopware-cli project admin-watch`
:::

Shopware-CLI has an integrated Standalone Admin Watcher. This is useful if the regular Admin Watcher struggles with the amount of installed extensions and you only want to watch one single extension. The Standalone Watcher works by using the regular build Administration and injects only the changed files of the extension.
Shopware-CLI has an integrated Standalone Admin Watcher. This is useful if the regular Admin Watcher struggles with the number of installed extensions, and you only want to watch one single extension. The Standalone Watcher works by using the regular build Administration and injects only the changed files of the extension.

Therefore the Watcher starts in few milliseconds and is very fast. Additionally, it can be targeted to an external Shopware 6 Instance to debug JavaScript or CSS changes with the external data.
Therefore, the Watcher starts in few milliseconds and is very fast. Additionally, it can be targeted to an external Shopware 6 Instance to debug JavaScript or CSS changes with the external data.

## Starting the Standalone Admin Watcher

Expand Down
14 changes: 7 additions & 7 deletions products/cli/extension-commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav:

# Building extensions and creating archives

Extensions consists of PHP Changes, JavaScript and CSS. To release an extension to the Shopware Store or upload it to a Shopware 6 instance without having to rebuild Storefront and Administration your extension needs to provide the compiled assets.
Extensions consist of PHP Changes, JavaScript and CSS. To release an extension to the Shopware Store or upload it to a Shopware 6 instance without having to rebuild Storefront and Administration, your extension needs to provide the compiled assets.

## Building an extension

Expand Down Expand Up @@ -37,7 +37,7 @@ build:
extraBundles:
# Assumes the bundle name is the same as the directory name
- path: src/Foo
# Explictly specify the bundle name
# Explicitly specify the bundle name
- path: src/Foo
name: Foo
```
Expand All @@ -48,7 +48,7 @@ build:
Building with esbuild works completely standalone without the Shopware codebase. This means if you import files from Shopware, you have to copy it to your extension.
:::

Esbuild can be utilized for JavaScript bundling, offering a significantly faster alternative to the standard Shopware bundling process, as it eliminates the need to involve Shopware for asset building.
Esbuild can be used for JavaScript bundling, offering a significantly faster alternative to the standard Shopware bundling process, as it eliminates the need to involve Shopware for asset building.

```yaml
# .shopware-extension.yml
Expand All @@ -71,7 +71,7 @@ shopware-cli extension zip <path>

The command copies the extension to a temporary directory, builds the assets, deletes unnecessary files and creates a zip archive of the extension. The archive is placed in the current working directory.

**By default the command picks the latest released git tag**, use `--disable-git` as flag to disable this behavior and use the current source code. Besides disabling it completely, you can also specify a specific tag or commit using `--git-commit`.
**By default, the command picks the latest released git tag**, use the `--disable-git` flag to disable this behavior and use the current source code. Besides disabling it completely, you can also specify a specific tag or commit using `--git-commit`.

### Bundling composer dependencies

Expand Down Expand Up @@ -129,14 +129,14 @@ changelog:
enabled: true
```

It utilizes the commits between the last tag and the current commit to generate the changelog. Additionally, it can be configured to filter commits and build the changelog differently.
It generates the changelog by utilizing the commits between the last tag and the current commit. Additionally, it can be configured to filter commits and build the changelog differently.

```yaml
changelog:
enabled: true
# only the commits matching to this regex will be used
pattern: '^NEXT-\d+'
# variables allows to extract metadata out of the commit message
# variables allow extracting metadata out of the commit message
variables:
ticket: '^(NEXT-\d+)\s'
# go template for the changelog, it loops over all commits
Expand All @@ -145,7 +145,7 @@ changelog:
{{end}}
```

This example checks that all commits in the changelog needs to start with `NEXT-` in the beginning. The `variables` section allows to extract metadata out of the commit message. The `template` is a go template which loops over all commits and generates the changelog.
This example checks that all commits in the changelog needs to start with `NEXT-` in the beginning. The `variables` section allows extracting metadata out of the commit message. The `template` is a go template which loops over all commits and generates the changelog.
With the combination of `pattern`, `variables` and `template` we link the commit message to the Shopware ticket system.

### Overwrites
Expand Down
4 changes: 2 additions & 2 deletions products/cli/extension-commands/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To validate an extension, you can use the following command:
shopware-cli extension validate <path>
```

The path can be absolute or relative to the directory containing the extension or the zip file. The command exists with a non-zero exit code if the validation fails with a error level message.
The path can be absolute or relative to the directory containing the extension or the zip file. The command exists with a non-zero exit code if the validation fails with an error level message.

## What is validated?

Expand All @@ -32,7 +32,7 @@ The path can be absolute or relative to the directory containing the extension o

## Supported PHP versions for linting

Following PHP versions are supported for linting:
The following PHP versions are supported for linting:

- 7.3
- 7.4
Expand Down
4 changes: 2 additions & 2 deletions products/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ nav:

# Shopware-CLI

Shopware-CLI is an open-source external command-line interface for Shopware 6. It provides a set of commands to interact with your Shopware instance, build extensions, dump databases and more. The CLI **is a external tool** and needs to be set up separately from your Shopware instance.
Shopware-CLI is an open-source external command-line interface for Shopware 6. It provides a set of commands to interact with your Shopware instance, build extensions, dump databases, and more. The CLI **is an extra tool** and needs to be set up separately from your Shopware instance.

The CLI consists of three main components:
The CLI consists of three command scopes:

- Project commands: Commands to interact with your Shopware project
- Extension commands: Commands to build Shopware extensions
Expand Down
14 changes: 10 additions & 4 deletions products/cli/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav:

# Installation

You can install the pre-compiled binary (in several different ways), use Docker or compile from the source.
You can install the pre-compiled binary (in several different ways), use Docker or compile it from the source.

Below you can find the steps for each of them.

Expand Down Expand Up @@ -47,7 +47,13 @@ yay -S shopware-cli-bin

### Manually: deb,rpm apt packages

Download the `.deb`, `.rpm` or `.apk` packages from the [releases](https://github.com/FriendsOfShopware/shopware-cli/releases/) page and install them with the appropriate tools.
Download the `.deb`, `.rpm` or `.apk` packages from the [releases](https://github.com/shopware/shopware-cli/releases/) page and install them with the appropriate tools.

```shell
sudo dpkg -i shopware-cli_0.5.2_linux_amd64.deb # for .deb
sudo rpm -i shopware-cli_0.5.2_linux_arm64.rpm # for .rpm
sudo apk add shopware-cli-0.5.2.apk # for .apk
```

### Nix

Expand Down Expand Up @@ -138,9 +144,9 @@ Add the following line to your docker image to copy the binary into your image.
COPY --from=shopware/shopware-cli:bin /shopware-cli /usr/local/bin/shopware-cli
```

## Manually
## Add binary manually

Download the pre-compiled binaries from the [releases](https://github.com/FriendsOfShopware/shopware-cli/releases/) page and copy them to the desired location.
Download the pre-compiled binaries from the [releases](https://github.com/shopware/shopware-cli/releases) page and copy them to the desired location.

## Running with Docker

Expand Down
8 changes: 4 additions & 4 deletions products/cli/project-commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ This command modifies the given directory and deletes files. Make sure you have
shopware-cli project ci <path>
```

## What it does?
## What does it do?

- It runs `composer install` (by default only installs the production dependencies, use `--with-dev-dependencies` to install the dev dependencies as well)
- It runs `composer install` (by default, only installs the production dependencies, use `--with-dev-dependencies` to install the dev dependencies as well)
- Looks for missing assets of extensions and only compiles the missing assets to speed up the build process
- Deletes unnecessary files like `node_modules` and many more to save disk space
- Deletes source code of compiled assets to save disk space
Expand Down Expand Up @@ -53,12 +53,12 @@ You can configure the build process with a `.shopware-project.yml` file. The fol
build:
# Browserlist configuration for Storefront
browserslist: 'defaults'
# Which paths should be deleted
# Paths that should be deleted
cleanup_paths:
- 'node_modules'
# At the end of the process, bin/console asset:install is executed, this can be disabled here
disable_asset_copy: false
# Exclude following extensions from the build process
# Exclude the following extensions from the build process
exclude_extensions:
- 'SwagExample'
# Keep the extension Administration and Storefront source code
Expand Down
8 changes: 4 additions & 4 deletions products/cli/project-commands/helper-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To create a new project, you can use the following command:
shopware-cli project create <folder-name>
```

It will ask you for the Shopware version. You can pass also the version as second parameter:
It will ask you for the Shopware version. You can pass the version as second parameter:

```bash
shopware-cli project create <folder-name> <version>
Expand All @@ -36,7 +36,7 @@ Shopware-CLI contains replacements for `bin/build-administration.sh` and `bin/bu
| bin/watch-storefront.sh | `shopware-cli project storefront-watch` |
| bin/watch-administration.sh | `shopware-cli project admin-watch` |

Additionally to the replacement, Shopware-CLI allows to only watch a specific set of extensions or exclude few.
Additionally to the replacement, Shopware-CLI allows only watching a specific set of extensions or exclude few.

To only watch specific:

Expand All @@ -62,7 +62,7 @@ For production, you should let this handle **supervisord** or **systemd**. But f

## Clear cache

It is just a short cut for `bin/console cache:clear` without having to be in the project root directory.
It is just a shortcut for `bin/console cache:clear` without having to be in the project root directory.

```bash
shopware-cli project clear-cache
Expand Down Expand Up @@ -90,7 +90,7 @@ It is similar to `bin/console system:generate-jwt-secret`, but requires no Shopw

## Admin API

If you want to make requests against the Shopware-API using curl, you need to obtain a JWT token and add it as a header. Shopware-CLI has a helper command for that:
If you want to make requests against the Shopware-API using curl, you need to get a JWT token and add it as a header. Shopware-CLI has a helper command for that:

```bash
shopware-cli project admin-api --output-token
Expand Down
2 changes: 1 addition & 1 deletion products/cli/project-commands/mysql-dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ By default Shopware-CLI will try to lock the table before dumping the data. This

The `--anonymize` flag will anonymize known user data tables. The following tables are anonymized:

[See here for the complete list](https://github.com/FriendsOfShopware/shopware-cli/blob/main/cmd/project/project_dump.go#L74)
[See here for the complete list](https://github.com/shopware/shopware-cli/blob/main/cmd/project/project_dump.go#L74)

It is possible to customize the anonymization process by using the `dump.rewrite` configuration in the `shopware-cli.yml` file.

Expand Down
6 changes: 2 additions & 4 deletions products/cli/project-commands/project-config-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ nav:

# Project config synchronization

Shopware-CLI can synchronize the project configurations between different environments. This is useful for example to keep the configuration in the development and production environment in sync.
Shopware-CLI can synchronize the project configurations between different environments. This is useful, for example, to keep the configuration in the development and production environment in sync.

Following things are possible to synchronize:
The Following things are possible to synchronize:

- Theme Configuration
- System Configuration (including extension configuration)
Expand Down Expand Up @@ -65,8 +65,6 @@ This example synchronizes a new tax entity with the name `Tax` and the tax rate

The further synchronizations will create the same entity again, you may want to fix the entity ID to avoid duplicates.

The further synchronizations will create the same entity again, you may want to fixed the entity ID to avoid duplicates.

```yaml
sync:
entity:
Expand Down
2 changes: 1 addition & 1 deletion products/cli/shopware-account-commands/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nav:

To interact with the Shopware Account API, you need to authenticate yourself.

For this you need to login using:
For this, you need to log in using:

```bash
shopware-cli account login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you don't see the shop you want to use, you need to switch to the correct com
To create a `auth.json` file with the Composer repository configuration, you can use the following command:

::: info
You can also use the tab completion in terminal to get the domains of the shops you have access to.
You can also use the tab completion in the terminal to get the domains of the shops you have access to.
:::

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ nav:

- You are logged into the Shopware Store. Checkout the [Authentication](./authentication.md) guide for more information.
- You have a zip file of your extensions with all assets. Checkout the [Creating a zip](../extension-commands/build.md) guide for more information.
- The zip file contains a `CHANGELOG*.md` file with an Changelog entry for the new version. Having a German changelog is optional.
- The zip file contains a `CHANGELOG*.md` file with a Changelog entry for the new version. Having a German changelog is optional.
- You have validated the zip file with `shopware-cli extension validate <zip-path>`. See [Validating the zip](../extension-commands/validation.md) for more information.

## Releasing the extension
Expand All @@ -24,4 +24,4 @@ shopware-cli account producer extension upload <zip-path>

This command will check first if an extension with the same version already exists in the store. If not, it will upload the extension to the store. For the compatibility of the extension, the command will use the Composer constraint of `composer.json` or `maniofest.xml` file.

After the upload, the command will wait for the result of the automatic validation. This can take a few minutes. If the validation fails, the command will output the error message and you need to fix the issue and upload the extension again. You can skip this check with the `--skip-for-review-result` option.
After the upload, the command will wait for the result of the automatic validation. This can take a few minutes. If the validation fails, the command will output the error message, and you need to fix the issue and upload the extension again. You can skip this check with the `--skip-for-review-result` option.
6 changes: 3 additions & 3 deletions products/cli/shopware-account-commands/updating-store-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ shopware-cli account producer extension info pull <path-to-extension-folder>

This will download all uploaded Store images and create a `.shopware-extension.yml` with all metadata of the extension.

This file can be checked-in into the version control and will be automatically removed when you create a zip file using Shopware-CLI.
This file can be checked in into the version control and will be automatically removed when you create a zip file using Shopware-CLI.

## Updating the Store page

Expand Down Expand Up @@ -51,7 +51,7 @@ store:
activate:
de: false
en: false
# Is the image an preview image, only one image can be a preview
# Is the image a preview image, only one image can be a preview
preview:
de: false
en: false
Expand All @@ -64,7 +64,7 @@ store:
image_directory: <path-to-directory>
```
The images will be sorted by the file name. If you want to seperate the images by language, you can create subdirectories with the language code like so:
The images will be sorted by the file name. If you want to separate the images by language, you can create subdirectories with the language code like so:
```text
src/Resources/store/images/
Expand Down

0 comments on commit 324a32c

Please sign in to comment.