xenomedia / xeno_hero

Drupal 8 module that creates a Hero Paragraphs bundle.
GNU General Public License v2.0
23 stars 18 forks source link

Overriding your libraries #19

Closed jellydonuts closed 6 years ago

jellydonuts commented 6 years ago

Great module, however I'm finding it very difficult to override your js library in my custom bootstrap subtheme.

I need to override your js file and have tried all the possible combinations to override however I feel like I'm missing the proper library naming scheme. Any ideas how I would go about doing this in my theme.info.yml's libraries-override section?

I even found a few bugs regarding overriding already overridden libraries requiring the absolute path relative to the root but still have no luck in preventing your js from attaching:


libraries-override:
  xenomedia/xeno-hero:
    js:
      js/xeno-hero.js: false
      /modules/custom/xeno_hero/js/xeno-hero.js: false
  mytheme/xeno-hero:
    js:
      js/xeno-hero.js: false
      /modules/custom/xeno_hero/js/xeno-hero.js: false
  xeno-hero/xeno-hero:
    js:
      js/xeno-hero.js: false
      /modules/custom/xeno_hero/js/xeno-hero.js: false
  xeno-hero:
    js:
      js/xeno-hero.js: false
      /modules/custom/xeno_hero/js/xeno-hero.js: false
jellydonuts commented 6 years ago

oh my god, i feel like a dumbass!

I've been wracking my brain for the last 3 hours... you're using an underscore in the filename, but a dash in the library name!

libraries-override:
  xeno_hero/xeno-hero:
    js:
      js/xeno-hero.js: js/xeno-hero-override.js