diff --git a/Observer/RegisterModuleForHyvaConfig.php b/Observer/RegisterModuleForHyvaConfig.php new file mode 100755 index 0000000..ed3cf50 --- /dev/null +++ b/Observer/RegisterModuleForHyvaConfig.php @@ -0,0 +1,34 @@ +componentRegistrar = $componentRegistrar; + } + + public function execute(Observer $event) + { + $config = $event->getData('config'); + $extensions = $config->hasData('extensions') ? $config->getData('extensions') : []; + + $moduleName = implode('_', array_slice(explode('\\', __CLASS__), 0, 2)); + + $path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, $moduleName); + + // Only use the path relative to the Magento base dir + $extensions[] = ['src' => substr($path, strlen(BP) + 1)]; + + $config->setData('extensions', $extensions); + } +} diff --git a/composer.json b/composer.json index 6db7228..fdeba24 100755 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "proxi-blue/hyva-smile-autocomplete-add-to-cart", - "version": "1.1.2", + "version": "1.1.3", "description": "Add To Cart inline in autocomplete", "type": "magento2-module", "require": { diff --git a/etc/frontend/events.xml b/etc/frontend/events.xml new file mode 100755 index 0000000..0e91ab1 --- /dev/null +++ b/etc/frontend/events.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/view/frontend/tailwind/tailwind.config.js b/view/frontend/tailwind/tailwind.config.js new file mode 100755 index 0000000..f44ed37 --- /dev/null +++ b/view/frontend/tailwind/tailwind.config.js @@ -0,0 +1,7 @@ +module.exports = { + purge: { + content: [ + '../templates/**/*.phtml', + ] + } +}