require_once 'afform_html.civix.php';
use CRM_AfformHtml_ExtensionUtil as E;
+if (!defined('AFFORM_HTML_MONACO')) {
+ define('AFFORM_HTML_MONACO', 'node_modules/monaco-editor/min/vs');
+}
+
/**
* Implements hook_civicrm_config().
*
* Implements hook_civicrm_check().
*/
function afform_html_civicrm_check(&$messages) {
- $dir = E::path(CRM_AfformHtml_Page_HtmlEditor::MONACO_DIR);
+ $dir = E::path(AFFORM_HTML_MONACO);
if (!file_exists($dir)) {
$messages[] = new CRM_Utils_Check_Message(
'afform_html_monaco',
return array(
'js' => [
- 'node_modules/monaco-editor/min/vs/loader.js',
+ AFFORM_HTML_MONACO . '/loader.js',
'ang/afMoncao.js',
// 'ang/afMoncao/*.js',
// 'ang/afMoncao/*/*.js',
'requires' => ['crmUi', 'crmUtil'],
'settings' => [
'paths' => [
- 'vs' => CRM_AfformHtml_ExtensionUtil::url('node_modules/monaco-editor/min/vs'),
+ 'vs' => CRM_AfformHtml_ExtensionUtil::url(AFFORM_HTML_MONACO),
],
],
'basePages' => [],