Skip to content
Snippets Groups Projects
Commit 147c3b7e authored by Joshua Sedler's avatar Joshua Sedler :cartwheel_tone2: Committed by Julian Pustkuchen
Browse files

Issue #3190470 by lawxen, Grevil, VladimirAus, Anybody: Support...

Issue #3190470 by lawxen, Grevil, VladimirAus, Anybody: Support asset-packagist for library download
parent fa72e768
No related branches found
No related tags found
1 merge request!7Issue #3190470: Support asset-packagist for library download
......@@ -29,10 +29,10 @@ locally download and unpack the library to the libraries directory. Make sure
the path to the library becomes: libraries/codemirror. Use
`drush codemirror:download` command for quick installation.
If you are using Composer for downloading third-party libraries turn off
the 'minified' setting as asset-packagist.org does not provide minified files.
See https://www.drupal.org/node/2718229/#third-party-libraries
If you are using Composer for downloading third-party libraries
(see [here](https://www.drupal.org/docs/develop/using-composer/manage-dependencies#third-party-libraries) on how to set it up),
turn off the 'minified' setting and require the `codemirror` library using
`composer require bower-asset/codemirror`.
CONFIGURATION
-------------
......
......@@ -5,6 +5,8 @@
* Install, update and uninstall functions for the CodeMirror editor module.
*/
use Drupal\Core\Url;
/**
* Implements hook_requirements().
*/
......@@ -35,11 +37,14 @@ function codemirror_editor_requirements($phase) {
$requirements['codemirror']['severity'] = REQUIREMENT_INFO;
}
else {
$requirements['codemirror']['value'] = t('Not found');
$requirements['codemirror']['value'] = t('<strong>Not found</strong>');
$requirements['codemirror']['severity'] = REQUIREMENT_ERROR;
$requirements['codemirror']['description'] = t(
'You need to download the <a href=":library_url">CodeMirror library</a> and extract the archive to the <em>libraries/codemirror</em> directory on your server.',
[':library_url' => 'https://codemirror.net/']
'You need to download the <a href=":library_url">CodeMirror library</a> and extract the archive to the <em>libraries/codemirror</em> directory on your server.<br>If you installed the library using composer, please remember to switch off the <em>minified</em> setting on the <a href="@settingsUrl">module settings page</a>',
[
':library_url' => 'https://codemirror.net/',
'@settingsUrl' => Url::fromRoute('codemirror_editor.settings')->toString(),
]
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment