Skip to content

Commit

Permalink
Textual update
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmangupta committed Jan 23, 2025
1 parent 8f2ffd0 commit fe6a3f2
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 81 deletions.
6 changes: 3 additions & 3 deletions products/cli/extension-commands/admin-watcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ To start the Standalone Admin Watcher, you can use the following command:
shopware-cli extension admin-watch <path-to-extension> <url-to-shopware>
```

The first parameter is the path to the extension you want to watch and the last parameter is the URL to the Shopware 6 instance. The URL must be reachable from the machine where the CLI is executed. You can watch also multiple extensions by providing multiple paths, but the last parameter must be the URL to the Shopware 6 instance.
The first parameter is the **path to extension** you want to watch and the last parameter is the URL to the Shopware 6 instance. The URL must be reachable from the machine where the CLI is executed. You can watch also multiple extensions by providing multiple paths, but the last parameter must be the URL to the Shopware 6 instance.

Check warning on line 26 in products/cli/extension-commands/admin-watcher.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] products/cli/extension-commands/admin-watcher.md#L26

Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2[4]) Suggestions: `, and` URL: https://languagetool.org/insights/post/types-of-sentences/#compound-sentence Rule: https://community.languagetool.org/rule/show/COMMA_COMPOUND_SENTENCE_2?lang=en-US&subId=4 Category: PUNCTUATION
Raw output
products/cli/extension-commands/admin-watcher.md:26:66: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2[4])
 Suggestions: `, and`
 URL: https://languagetool.org/insights/post/types-of-sentences/#compound-sentence 
 Rule: https://community.languagetool.org/rule/show/COMMA_COMPOUND_SENTENCE_2?lang=en-US&subId=4
 Category: PUNCTUATION

You can pass also the path of an Shopware project to the command. In this case, the CLI will automatically detect the extensions.
You can also pass **path of a Shopware project** to the command. In this case, the CLI will automatically detect the extensions.

The listing port of the Admin Watcher can be changed with `--listen :<port>`.

## Usage behind a proxy

If you want to use the Standalone Admin Watcher behind a proxy to have, for example, SSL, you should set `--external-url` to the URL where the Admin Watcher will be reachable in the Browser.
If you want to use the Standalone Admin Watcher behind a proxy, for example, SSL, you should set `--external-url` to the URL where the Admin Watcher will be reachable in the Browser.
20 changes: 10 additions & 10 deletions products/cli/extension-commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Shopware-CLI allows you to easily build the assets of an extension. To build an
shopware-cli extension build <path>
```

Shopware-CLI reads the `shopware/core` requirement in `composer.json` or `manifest.xml` and uses the lowest possible Shopware Version to build the assets. This allows that the extension can be used in multiple Shopware versions. If this version is not correct, you can override it in a `.shopware-extension.yml`
Shopware-CLI reads the `shopware/core` requirement from `composer.json` or `manifest.xml` and builds the assets using the lowest compatible Shopware version. This ensures the extension remains usable across multiple Shopware versions. If the selected version is incorrect, you can override it using a `.shopware-extension.yml` file.

```yaml
# .shopware-extension.yml
build:
shopwareVersionConstraint: '6.6.9.0'
```
This has only affect on the build process and not on the installation of the extension, for full control you can specify also the environment variable `SHOPWARE_PROJECT_ROOT` pointing to a Shopware 6 project and it will use that Shopware to build the extension assets.
This only affects the build process and not on the installation of the extension. For full control you can also specify the environment variable `SHOPWARE_PROJECT_ROOT` pointing to a Shopware 6 project, and it will use that Shopware to build the extension assets.

## Additional bundles

Expand All @@ -45,10 +45,10 @@ build:
## Using esbuild for JavaScript Bundling

::: warning
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.
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.
:::

It's possible to use esbuild for JavaScript bundling. This is way faster than the usual Shopware bundling as Shopware itself is not necessary to build the assets.
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.

```yaml
# .shopware-extension.yml
Expand All @@ -75,7 +75,7 @@ The command copies the extension to a temporary directory, builds the assets, de

### Bundling composer dependencies

Prior to Shopware 6.5, it's required to bundle the composer dependencies into the zip file. So Shopware-CLI runs automatically `composer install` for you and strips duplicate composer dependencies to avoid conflicts.
Before Shopware 6.5, bundling the composer dependencies into the zip file is required. Shopware-CLI automatically runs `composer install` and removes duplicate composer dependencies to avoid conflicts.

To disable this behavior, you can adjust the configuration:

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

and uses the commits between the last tag and the current commit to generate the changelog. It can be further configured to filter commits and build the changelog differently.
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.

```yaml
changelog:
Expand All @@ -150,22 +150,22 @@ With the combination of `pattern`, `variables` and `template` we link the commit

### Overwrites

It's possible to overwrite extension configuration while zipping like to change the version and app related things
Extension configuration can be overwritten during the zipping process, allowing changes to aspects such as the version and app-related settings.

```yaml
shopware-cli extension zip --overwrite-version=1.0.0 <path>
```

replaces the version in `composer.json` or `manifest.xml` with the given version.
Replaces the version in `composer.json` or `manifest.xml` with the given version.

```yaml
shopware-cli extension zip --overwrite-app-backend-url=https://example.com <path>
```

replaces all external URLs in `manifest.xml` to that given URL.
Replaces all external URLs in `manifest.xml` to that given URL.

```yaml
shopware-cli extension zip --overwrite-app-backend-secret=MySecret <path>
```

replaces the App secret in `manifest.xml` with the given secret.
Replaces the App secret in `manifest.xml` with the given secret.
2 changes: 1 addition & 1 deletion products/cli/extension-commands/extract-meta-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav:

# Extracting Meta Data

There are helpers in Shopware-CLI to extract data of a extension. This is useful in your CI/CD pipeline to get the extension version or the changelog for the automated release.
There are helpers in Shopware-CLI to extract data of an extension. This is useful in your CI/CD pipeline to get the extension version or the changelog for the automated release.

## Extracting the version

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

# Extension Validation

Shopware-CLI has an builtin validation for extensions. This is useful in your CI/CD pipeline to validate the extension before you release it.
Shopware-CLI has a built-in validation for extensions. This is useful in your CI/CD pipeline to validate the extension before you release it.

## Validating an extension

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

## What is validated?

- The composer.json has an `shopware/core` requirement and constraint is parsable
- The extension metadata is filled:
- The `composer.json` has an `shopware/core` requirement and constraint is parsable
- The extension metadata is filled with:
- `name`
- `label` (German and English)
- `description` (German and English) and longer than 150 characters and shorter than 185 characters
- Translations have equality translated in the given languages
- PHP can be correctly linted with the minimum PHP version
- The theme.json can be parsed and included assets can be found
- The `theme.json` can be parsed and included assets can be found

Check warning on line 31 in products/cli/extension-commands/validation.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] products/cli/extension-commands/validation.md#L31

Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2[4]) Suggestions: `, and` URL: https://languagetool.org/insights/post/types-of-sentences/#compound-sentence Rule: https://community.languagetool.org/rule/show/COMMA_COMPOUND_SENTENCE_2?lang=en-US&subId=4 Category: PUNCTUATION
Raw output
products/cli/extension-commands/validation.md:31:32: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2[4])
 Suggestions: `, and`
 URL: https://languagetool.org/insights/post/types-of-sentences/#compound-sentence 
 Rule: https://community.languagetool.org/rule/show/COMMA_COMPOUND_SENTENCE_2?lang=en-US&subId=4
 Category: PUNCTUATION

## Supported PHP versions for linting

Expand Down
2 changes: 1 addition & 1 deletion products/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ The CLI consists of three main components:
- Extension commands: Commands to build Shopware extensions
- Store commands: Commands to publish extensions to the Shopware Store or update

If you want to use the CLI, you need to [install it first](installation.md) or take a look at the each area of the CLI.
If you want to use the CLI, you need to [install it first](installation.md) or take a look at each area of the CLI.
24 changes: 13 additions & 11 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 source.
You can install the pre-compiled binary (in several different ways), use Docker or compile from the source.

Below you can find the steps for each of them.

Expand Down Expand Up @@ -45,15 +45,17 @@ 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/FriendsOfShopware/shopware-cli/releases/) page and install them with the appropriate tools.

### Nix

Install **Nix** package from here:

```shell
nix profile install nixpkgs#shopware-cli
```

or directly from the FriendsOfShopware repository (more up to date)
or directly from the **FriendsOfShopware** repository (more up to date)

```shell
nix profile install github:FriendsOfShopware/nur-packages#shopware-cli

Check warning on line 61 in products/cli/installation.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] products/cli/installation.md#L61

The official name of this software platform is spelled with a capital “H”. (GITHUB[1]) Suggestions: `GitHub` URL: https://en.wikipedia.org/wiki/GitHub Rule: https://community.languagetool.org/rule/show/GITHUB?lang=en-US&subId=1 Category: CASING
Raw output
products/cli/installation.md:61:16: The official name of this software platform is spelled with a capital “H”. (GITHUB[1])
 Suggestions: `GitHub`
 URL: https://en.wikipedia.org/wiki/GitHub 
 Rule: https://community.languagetool.org/rule/show/GITHUB?lang=en-US&subId=1
 Category: CASING
Expand All @@ -74,7 +76,7 @@ inputs:
follows: "nixpkgs"
```
and then you can use the new input in the `devenv.nix` file. Don't forget to add the `inputs` argument, to the first line.
Then you can use the new input in the `devenv.nix` file. Don't forget to add the `inputs` argument, to the first line.

```nix
{ pkgs, inputs, ... }: {
Expand All @@ -97,7 +99,7 @@ and then you can use the new input in the `devenv.nix` file. Don't forget to add

### GitHub Action

using Shopware CLI Action
Using Shopware CLI Action :

```yaml
- name: Install shopware-cli
Expand Down Expand Up @@ -134,13 +136,13 @@ 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
## Manually

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

## Running with Docker

You can also use it within a Docker container. To do that, you'll need to execute something more-or-less like the examples below.
You can also use it within a Docker container. To do that, you will need to execute something more or less like the examples below.

Registries:

Expand All @@ -164,26 +166,26 @@ docker run \

If you just want to build from source for whatever reason, follow these steps:

### clone
### Clone

```bash
git clone https://github.com/FriendsOfShopware/shopware-cli
cd shopware-cli
```

### get the dependencies
### Get the dependencies

```bash
go mod tidy
```

### build
### Build

```bash
go build -o shopware-cli .
```

### verify it works
### Verify

```bash
./shopware-cli --version
Expand Down
18 changes: 9 additions & 9 deletions products/cli/project-commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav:

# Build a complete Project

Usually when you want to deploy your Project you want to run `composer install` and want to compile the assets of the project. Shopware-CLI provides a single command which does all of this for you.
Usually, when you want to deploy your project, you have to run `composer install` and compile the assets of the project. Shopware-CLI provides a single command which does all of this for you.

::: warning
This command modifies the given directory and deletes files. Make sure you have committed all your changes before running this command.
Expand All @@ -19,31 +19,31 @@ shopware-cli project ci <path>

## What it does?

- It runs `composer install` (by default only installs the production dependencies, use `--with-dev-dependencies` to install also the dev dependencies)
- 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
- Merges snippets of extensions to speed up Administration

## Using private Composer repositories

If you want to use packages.shopware.com as a private Composer repository, make sure you have set `SHOPWARE_PACKAGES_TOKEN` environment variable to your Composer token. This can be found in your Shopware Account.
If you want to use `packages.shopware.com` as a private Composer repository, make sure you have set `SHOPWARE_PACKAGES_TOKEN` environment variable to your Composer token. This can be found in your Shopware Account.

For other private Composer repositories, you can use the `auth.json` file in the root of your project or set `COMPOSER_AUTH` environment variable with the content of the `auth.json` file.

For more information, see the [Composer documentation](https://getcomposer.org/doc/articles/authentication-for-private-packages.md).

## Reducing JavaScript in Storefront

Shopware's default Browserlist still supports older Browsers like Internet Explorer 11. If you want to reduce JavaScript polyfill and CSS prefixes, you can adjust the Browserlist configuration in the `.shopware-project.yml` file.
Shopware's default `browserlist` still supports older browsers like Internet Explorer 11. If you want to reduce JavaScript polyfill and CSS prefixes, you can adjust the `browserlist` configuration in the `.shopware-project.yml` file.

```yaml
build:
# Browserlist configuration for Storefront
browserslist: 'defaults'
```
You can check [here which Browsers would be affected](https://browsersl.ist/#q=defaults).
You can check [here which browsers would be affected](https://browsersl.ist/#q=defaults).
## Configuration options
Expand Down Expand Up @@ -72,7 +72,7 @@ build:

## Supporting bundles

Plugins and Apps are automatically detected by Shopware-CLI. Custom Bundles (classes that extend Bundle class from Shopware) cannot be automatically detected as Shopware-CLI does not execute any PHP code.
Plugins and Apps are automatically detected by Shopware-CLI. Custom bundles (classes that extend bundle class from Shopware) cannot be automatically detected as Shopware-CLI does not execute any PHP code.

Check warning on line 75 in products/cli/project-commands/build.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] products/cli/project-commands/build.md#L75

A comma may be missing after the conjunctive/linking adverb ‘Therefore’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA[1]) Suggestions: `Therefore,` URL: https://languagetool.org/insights/post/linking-words/ Rule: https://community.languagetool.org/rule/show/SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
products/cli/project-commands/build.md:75:205: A comma may be missing after the conjunctive/linking adverb ‘Therefore’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA[1])
 Suggestions: `Therefore,`
 URL: https://languagetool.org/insights/post/linking-words/ 
 Rule: https://community.languagetool.org/rule/show/SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA?lang=en-US&subId=1
 Category: PUNCTUATION
Therefore you need to add the path of the custom bundle to your project `composer.json`:

```json
Expand All @@ -86,7 +86,7 @@ Therefore you need to add the path of the custom bundle to your project `compose
}
```

If your bundle folder names does not match your Bundle name, you can use the `name` key to map the folder to the bundle name.
If your bundle folder names does not match your bundle name, you can use the `name` key to map the folder to the bundle name.

Check warning on line 89 in products/cli/project-commands/build.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] products/cli/project-commands/build.md#L89

The verb form ‘does’ does not seem to match the subject ‘names’. (SUBJECT_VERB_AGREEMENT_PLURAL[1]) Suggestions: `do`, `did`, `will do` Rule: https://community.languagetool.org/rule/show/SUBJECT_VERB_AGREEMENT_PLURAL?lang=en-US&subId=1 Category: GRAMMAR
Raw output
products/cli/project-commands/build.md:89:28: The verb form ‘does’ does not seem to match the subject ‘names’. (SUBJECT_VERB_AGREEMENT_PLURAL[1])
 Suggestions: `do`, `did`, `will do`
 Rule: https://community.languagetool.org/rule/show/SUBJECT_VERB_AGREEMENT_PLURAL?lang=en-US&subId=1
 Category: GRAMMAR

```json
{
Expand Down Expand Up @@ -118,7 +118,7 @@ With this Composer type, `shopware-cli extension build` also works for your bund

## Example Docker Image

This is an example Dockerfile which builds a Shopware Project and copies the source code to the `/var/www/html` folder.
This is an example Dockerfile which builds a Shopware project and copies the source code to the `/var/www/html` folder.

```dockerfile
#syntax=docker/dockerfile:1.4
Expand Down Expand Up @@ -146,4 +146,4 @@ FROM base-image
COPY --from=build --chown=82 --link /src /var/www/html
```

Besides Docker, it's also an perfect fit for any deployment variant.
Besides Docker, it is also a perfect fit for any deployment variant.
18 changes: 9 additions & 9 deletions products/cli/project-commands/helper-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ nav:

This is a curated list of helper commands that are useful for your daily work with Shopware-CLI in your Shopware project.

## Create a new Project
## Create a new project

To create a new project, you can use the following command:

```bash
shopware-cli project create <folder-name>
```

and 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 also the version as second parameter:

```bash
shopware-cli project create <folder-name> <version>
```

The version parameter can be also `latest` for the latest stable version or `dev-trunk` for the latest development version.

## Replacements to included Shell Scripts
## Replacements to include in shell scripts

Shopware-CLI contains replacements for `bin/build-administration.sh` and `bin/build-storefront.sh`.

Expand Down Expand Up @@ -60,9 +60,9 @@ shopware-cli project worker <amount>

For production, you should let this handle supervisord or systemd. But for development, this is a quick way to start multiple workers.

## Clear Cache
## Clear cache

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

```bash
shopware-cli project clear-cache
Expand All @@ -72,7 +72,7 @@ If in the `.shopware-project.yml` a API connection is configured, it will clear

## Console

Similar to Clear Cache, there is also a general shortcut for `bin/console`:
Similar to `clear-cache`, there is also a general shortcut for `bin/console`:

```bash
shopware-cli project console <command>
Expand All @@ -86,11 +86,11 @@ To generate a new JWT secret, you can use the following command:
shopware-cli project generate-jwt
```

It's similar to `bin/console system:generate-jwt-secret`, but requires no Shopware project to be present or PHP to be installed.
It is similar to `bin/console system:generate-jwt-secret`, but requires no Shopware project to be present or PHP to be installed.

## 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 header. Shopware-CLI has a helper command for that:
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:

```bash
shopware-cli project admin-api --output-token
Expand All @@ -102,4 +102,4 @@ This will output the JWT token to the console. You can also make directly API re
shopware-cli project admin-api GET /_info/version
```

you can pass also more options like `-d` for data or `-H` for headers as you would do with curl.
You can also pass more options like `-d` for data or `-H` for headers as you would do with curl.
Loading

0 comments on commit fe6a3f2

Please sign in to comment.