How can I add CSS or JavaScript files? I want to add two files, CSS and JavaScript, to be used in a Drupal site,  without linking them to the used theme. I can add these with Bash.
touch /var/www/html/example.com/{css.css,js.js}
chmod 644 /var/www/html/example.com/{css.css,js.js}

I need to include both files.
Sometimes I create small sites without modifying the theme at all, but I still need some minor CSS/JavaScript changes that don't justify creating a sub-theme. I wouldn't mind creating two &quot;quick&quot; and &quot;global&quot; files directly on the Drupal directory just for that.
Can this be done in Drupal 8.5.6?
Add a module, give it a libraries file (MODULE.libraries.yml):

global:
  js:
    /js.js: {}
  css:
    theme:
      /css.css: {}


In the .module file, implement hook_page_attachments:

function MODULE_page_attachments(array &amp;$attachments) {
  $attachments['#attached']['library'][] = 'MODULE/global';
}


When you enable the module (or clear cache if it's an existing module), the CSS and JS will be included on every page.