Skip to content

Instantly share code, notes, and snippets.

@amazingrando
Last active April 18, 2023 13:06
Show Gist options
  • Save amazingrando/df9c1ee90c450e6324d2c84f140df6cc to your computer and use it in GitHub Desktop.
Save amazingrando/df9c1ee90c450e6324d2c84f140df6cc to your computer and use it in GitHub Desktop.
Adding a JS library to an Emulsify Component in Drupal files
carousel:
js:
dist/js/03-organisms/carousel/carousel.js: {}
dependencies:
- core/drupal
swiper:
css:
theme:
node_modules/swiper/swiper-bundle.min.css: {}
js:
node_modules/swiper/swiper-bundle.min.js: {}
dependencies:
- core/drupal
@csakiistvan
Copy link

csakiistvan commented Apr 18, 2023

Please indent the swiper/js like this:

swiper:
  css:
    theme:
      node_modules/swiper/swiper-bundle.min.css: {}
  js:
    node_modules/swiper/swiper-bundle.min.js: {}
  dependencies:
    - core/drupal

@amazingrando
Copy link
Author

I've updated it. Good catch and thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment