One of the next important files you will find in your quest to build that Drupal 8 module will be the Libraries YML file, in Drupal 7 Libraries API provided a way for including Javascript, CSS, and third party libraries into your projects.  In Drupal 8 this has morphed into the primary way that all css, javascript, and libraries will be added into Drupal.

Each Library definition starts with a machine name, this needs to be the standard machine name you are used to meaning No spaces( ) or hyphens(-).  Past this you can add in details like a version number, licens, and whether it is remote or local.  You can add either CSS or JS to your project.  In addition to listing the files under the Css or JS, you can also add various processor commands to let drupal know if the file is external, or maybe minified.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.