According to Drupal standards, modules should include dependencies in the .info.yml file.
Dependencies should be namespaced in the format {project}:{module}, where {project} is the project name as it appears in the Drupal.org URL (e.g. drupal.org/project/views) and {module} is the module's machine name.
https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-...
Patch to follow, thanks!

Comments

alonaoneill created an issue. See original summary.

alonaoneill’s picture

Assigned: alonaoneill » Unassigned
Status: Active » Needs review
StatusFileSize
new331 bytes

I uploaded a patch that fixs dependency namespacing in the .info.yml file.
Thanks!

supriya1992’s picture

Assigned: Unassigned » supriya1992
supriya1992’s picture

Hi,

For using ckeditor dependency inside any custom module, we have to first define dependency inside library.yml file which will attached inside anywhere in that custom module.
Code for library.yml file as:

scripts:
js:
js/my_script.js: {}
dependencies:
- ckeditor/drupal.ckeditor

Now just create a js file named "my_script.js" inside js folder(or where you want)

Final step is to attach the library where you want as:
[
"#attached" => [
"library" => ["mymodule/scripts"]
];

Here mymodule/scripts ---- is used to attached the library name "scripts" define inside library.yml file and "mymodule" is the name of custom module.