From 280236754dc02689692515ef7e70ee8bd4cf15f9 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 ++++++++++++++++ .../sylius-master-theme-plugin/1.0/manifest.json | 16 ++++++++++++++++ 4 files changed, 38 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/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/manifest.json b/monsieurbiz/sylius-master-theme-plugin/1.0/manifest.json new file mode 100644 index 0000000..7ce35ad --- /dev/null +++ b/monsieurbiz/sylius-master-theme-plugin/1.0/manifest.json @@ -0,0 +1,16 @@ +{ + "bundles": { + "MonsieurBiz\\SyliusMasterThemePlugin\\MonsieurBizSyliusMasterThemePlugin": ["all"] + }, + "copy-from-recipe": { + "assets/": "assets/" + }, + "add-lines": [ + { + "file": "composer.json", + "content": "\n \"vendor/monsieurbiz/sylius-master-theme-plugin/scripts/replace_intl_extension.php\": \"php-script\",\n", + "position": "after_target", + "target": "\"auto-scripts\": {" + } + ] +}