diff --git a/composer.json b/composer.json index 4c392a7..cd3a157 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,12 @@ "require": { "silverstripe/framework": "^4", "cebe/markdown": "1.1.2" + }, + + "extra": { + "expose": [ + "client/dist" + ] } } diff --git a/src/extensions/MarkdownFieldExtension.php b/src/extensions/MarkdownFieldExtension.php index 1b5f348..bc64b89 100644 --- a/src/extensions/MarkdownFieldExtension.php +++ b/src/extensions/MarkdownFieldExtension.php @@ -20,8 +20,15 @@ class MarkdownFieldExtension extends Extension public function init() { $module = ModuleLoader::getModule('silverstripers/silverstripe-markdown'); - Requirements::javascript($module->getRelativeResourcePath("client/dist/bundle.min.js")); - Requirements::css($module->getRelativeResourcePath("client/dist/bundle.min.css")); + //Requirements::javascript($module->getRelativeResourcePath("client/dist/bundle.min.js")); + //Requirements::css($module->getRelativeResourcePath("client/dist/bundle.min.css")); + + + Requirements::javascript('silverstripers/silverstripe-markdown:client/dist/bundle.min.js'); + Requirements::css('silverstripers/silverstripe-markdown:client/dist/bundle.min.css'); + + + } } \ No newline at end of file