Skip to content
Open
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
12 changes: 6 additions & 6 deletions guides/development/start-developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ make watch-admin
make watch-storefront
```

### Alternative: run build and watch scripts directly
### Alternative: use Shopware CLI

If you prefer not to use `make`, your project also provides bash scripts in the `bin/` directory to build and watch the Administration and Storefront. Run the following commands:
If you prefer not to use `make`, you can use the [Shopware CLI](https://developer.shopware.com/docs/products/cli/) to build and watch the Administration and Storefront. Run the following commands:

```bash
./bin/build-administration.sh
./bin/build-storefront.sh
./bin/watch-administration.sh
./bin/watch-storefront.sh
shopware-cli project admin-build
shopware-cli project storefront-build
shopware-cli project admin-watch
shopware-cli project storefront-watch
```

The `watch` commands monitor changes to the Administration and Storefront and automatically rebuild them.
Expand Down
8 changes: 4 additions & 4 deletions guides/development/tooling/using-watchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ composer run build:js:admin
<Tab title="Build administration (Production template)">

```bash
./bin/build-administration.sh
shopware-cli project admin-build
```

</Tab>
Expand All @@ -39,7 +39,7 @@ composer run build:js:storefront
<Tab title="Build storefront (Production template)">

```bash
./bin/build-storefront.sh
shopware-cli project storefront-build
```

</Tab>
Expand Down Expand Up @@ -83,15 +83,15 @@ To enable Hot Module Reloading, use the following shell scripts in the Shopware
<Tab title="Admin watcher">

```bash
./bin/watch-administration.sh
shopware-cli project admin-watch
```

</Tab>

<Tab title="Storefront watcher">

```bash
./bin/watch-storefront.sh
shopware-cli project storefront-watch
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ index.json

### Partially compiling the Storefront

You can also build just the JavaScript bundle using `CI=1 SHOPWARE_SKIP_THEME_COMPILE=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true bin/build-storefront.sh` (without the need for the above loader) in your CI. After that, run `bin/console theme:dump` on your production system when the database is available. This will happen automatically if theme variables are changed via the admin panel.
You can also build just the JavaScript bundle using `CI=1 SHOPWARE_SKIP_THEME_COMPILE=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true shopware-cli project storefront-build` (without the need for the above loader) in your CI. After that, run `bin/console theme:dump` on your production system when the database is available. This will happen automatically if theme variables are changed via the admin panel.

## Cache directory and hash implications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ As mentioned above, Shopware 6 is looking for a `main.js` file in your plugin. I
<Tab title="Template">

```bash
./bin/build-administration.sh
shopware-cli project admin-build
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Given this plugin would be named "AdministrationNewModule", the bundled and mini
<Tab title="Template">

```bash
./bin/build-administration.sh
shopware-cli project admin-build
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Don't forget to rebuild the Administration after applying changes to your `main.
<Tab title="Template">

```bash
./bin/build-administration.sh
shopware-cli project admin-build
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ PluginManager.register(
Build the Storefront using:

```bash
./bin/build-storefront.sh
shopware-cli project storefront-build
```

## Next steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ To see your changes you have to build the storefront. Use the following command
<Tab title="Template">

```bash
./bin/build-storefront.sh
shopware-cli project storefront-build
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ To see your changes you have to build the Storefront. Use the following command
<Tab title="Template">

```bash
./bin/build-storefront.sh
shopware-cli project storefront-build
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ To see your changes you have to build the Storefront. Use the following command
<Tab title="Template">

```bash
./bin/build-storefront.sh
shopware-cli project storefront-build
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Now you want to test if your custom styles actually apply to the Storefront. For
<Tab title="Template">

```bash
./bin/build-storefront.sh
shopware-cli project storefront-build
```

</Tab>
Expand All @@ -86,7 +86,7 @@ If you want to see all style changes made by you live, you can also use our Stor
<Tab title="Template">

```bash
./bin/watch-storefront.sh
shopware-cli project storefront-watch
```

</Tab>
Expand Down
4 changes: 2 additions & 2 deletions guides/plugins/themes/add-css-js-to-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Add some test code in order to see if it works out:
console.log('SwagBasicExampleTheme JS loaded');
```

In the end, by running the command `bin/build-storefront.sh` your custom JS plugin is loaded. By default, the compiled JavaScript file is saved as `<plugin root>/src/resources/app/storefront/dist/storefront/js/swag-basic-example-theme/swag-basic-example-theme.js`. It is detected by Shopware automatically and included in the Storefront. So you do not need to embed the JavaScript file yourself.
In the end, by running the command `shopware-cli project storefront-build` your custom JS plugin is loaded. By default, the compiled JavaScript file is saved as `<plugin root>/src/resources/app/storefront/dist/storefront/js/swag-basic-example-theme/swag-basic-example-theme.js`. It is detected by Shopware automatically and included in the Storefront. So you do not need to embed the JavaScript file yourself.

## Using the hot-proxy \(live reload\)

Expand All @@ -104,7 +104,7 @@ To activate the hot-proxy, run the following command in your terminal.
<Tab title="Template">

```bash
./bin/watch-storefront.sh
shopware-cli project storefront-watch
```

</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Please only add variable overrides in this file. You should not write CSS code l
:::

::: info
When running `composer run watch:storefront` in platform only setups or `./bin/watch-storefront.sh` in the production template, SCSS variables will be injected dynamically by webpack. When writing selectors and properties in the `overrides.scss` the code can appear multiple times in your built CSS.
When running `composer run watch:storefront` in platform only setups or `shopware-cli project storefront-watch` in the production template, SCSS variables will be injected dynamically by webpack. When writing selectors and properties in the `overrides.scss` the code can appear multiple times in your built CSS.
:::

## Next steps
Expand Down
Loading