From 493ec60b36c56e39a5d1299051e2b7f2ff248872 Mon Sep 17 00:00:00 2001 From: David Buros Date: Mon, 28 Oct 2024 22:43:32 +0100 Subject: [PATCH] Add recipe for master theme --- .../1.0/assets/bootstrap.js | 2 ++ .../1.0/assets/controllers.json | 4 ++++ .../1.0/assets/controllers/hello_controller.js | 16 ++++++++++++++++ .../monsieurbiz_sylius_master_theme_plugin.yaml | 2 ++ .../sylius-master-theme-plugin/1.0/manifest.json | 9 +++++++++ 5 files changed, 33 insertions(+) create mode 100644 monsieurbiz/sylius-master-theme-plugin/1.0/assets/bootstrap.js create mode 100644 monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers.json create mode 100644 monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers/hello_controller.js create mode 100644 monsieurbiz/sylius-master-theme-plugin/1.0/config/packages/monsieurbiz_sylius_master_theme_plugin.yaml create mode 100644 monsieurbiz/sylius-master-theme-plugin/1.0/manifest.json diff --git a/monsieurbiz/sylius-master-theme-plugin/1.0/assets/bootstrap.js b/monsieurbiz/sylius-master-theme-plugin/1.0/assets/bootstrap.js new file mode 100644 index 0000000..2689398 --- /dev/null +++ b/monsieurbiz/sylius-master-theme-plugin/1.0/assets/bootstrap.js @@ -0,0 +1,2 @@ +// register any custom, 3rd party controllers here +// app.register('some_controller_name', SomeImportedController); diff --git a/monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers.json b/monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers.json new file mode 100644 index 0000000..e2ce9b5 --- /dev/null +++ b/monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers.json @@ -0,0 +1,4 @@ +{ + "controllers": [], + "entrypoints": [] +} diff --git a/monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers/hello_controller.js b/monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers/hello_controller.js new file mode 100644 index 0000000..c77bb76 --- /dev/null +++ b/monsieurbiz/sylius-master-theme-plugin/1.0/assets/controllers/hello_controller.js @@ -0,0 +1,16 @@ +import { Controller } from '@hotwired/stimulus'; + +/* + * This is an example Stimulus controller! + * + * Any element with a data-controller="hello" attribute will cause + * this controller to be executed. The name "hello" comes from the filename: + * hello_controller.js -> "hello" + * + * Delete this file or adapt it for your use! + */ +export default class extends Controller { + connect() { + this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js'; + } +} diff --git a/monsieurbiz/sylius-master-theme-plugin/1.0/config/packages/monsieurbiz_sylius_master_theme_plugin.yaml b/monsieurbiz/sylius-master-theme-plugin/1.0/config/packages/monsieurbiz_sylius_master_theme_plugin.yaml new file mode 100644 index 0000000..7d15900 --- /dev/null +++ b/monsieurbiz/sylius-master-theme-plugin/1.0/config/packages/monsieurbiz_sylius_master_theme_plugin.yaml @@ -0,0 +1,2 @@ +imports: + resource: '@MonsieurBizSyliusMasterThemePlugin/Resources/config/config.yaml' diff --git a/monsieurbiz/sylius-master-theme-plugin/1.0/manifest.json b/monsieurbiz/sylius-master-theme-plugin/1.0/manifest.json new file mode 100644 index 0000000..a0ee750 --- /dev/null +++ b/monsieurbiz/sylius-master-theme-plugin/1.0/manifest.json @@ -0,0 +1,9 @@ +{ + "bundles": { + "MonsieurBiz\\SyliusMasterThemePlugin\\MonsieurBizSyliusMasterThemePlugin": ["all"] + }, + "copy-from-recipe": { + "assets/": "assets/", + "config/": "%CONFIG_DIR%/" + } +}