The library can be broken into much smaller, Paragraphs bundle specific libraries for better performance.

bootstrap_paragraphs/bootstrap-paragraphs

Base library which will contain these sections from the less/css:
Base Paragraph Styling.
Here we add Widths.
Nesting paragraphs helpers.

Break Colors out into own file.

bootstrap_paragraphs/bp-accordion

Accordion Paragraph.

bootstrap_paragraphs/bp-carousel

Carousel Paragraph.

bootstrap_paragraphs/bp-columns

Columns Paragraph.
(Need to split the first rule into the three column libraries)

bootstrap_paragraphs/bp-columns-two

Two Uneven Columns Paragraph.

bootstrap_paragraphs/bp-columns-three

Three Uneven Columns Paragraph.

bootstrap_paragraphs/bp-image

Image Paragraph.

bootstrap_paragraphs/bp-modal

Modal Paragraph.

bootstrap_paragraphs/bp-tabs

Tabs Paragraph.

Comments

thejimbirch created an issue. See original summary.

  • thejimbirch committed 2805cc9 on 8.x-2.x
    Issue #2896280 by thejimbirch: Split module library into multiple...
  • thejimbirch committed 35784c0 on 8.x-2.x
    Issue #2896280 by thejimbirch: Split module library into multiple...
thejimbirch’s picture

Issue summary: View changes
Status: Active » Needs review

  • thejimbirch committed 96b912f on 8.x-2.x
    Issue #2896280 by thejimbirch: Fixes Three column template; Adds Columns...
thejimbirch’s picture

Status: Needs review » Needs work

  • thejimbirch committed 568cdb5 on 8.x-2.x
    Issue #2896280 by thejimbirch: Renames Base library bootstrap-paragraphs...
thejimbirch’s picture

Renamed Base library back to bootstrap-paragraphs, better for those who have forked/extended it.

Still to do, either add a template for Columns or better yet, add a condition in the base template using something like this:

{% if 'bp_' in paragraph.bundle %}
...
{% else %}
  {% include 'paragraph.html.twig' %}
{% endif %}

And break out the bp-columns library there.

Don't forget to add it to the other two columns bundles.

  • thejimbirch committed e82ef6d on 8.x-2.x
    Issue #2896280 by thejimbirch: Carousel fixes, Library updated, Minified...

  • thejimbirch committed 840cf96 on 8.x-2.x
    Issue #2896280 by thejimbirch: Completes split of Columns libraries and...
thejimbirch’s picture

Issue summary: View changes
thejimbirch’s picture

Status: Needs work » Fixed

Fixed in dev.

  • Multiple libraries created.
  • Individual LESS, CSS, and Minified CSS files created
  • Templates updated to call the individual libraries
  • Default template updated to conditionally call columns library if bp_columns.

Code for that was:

{% if paragraph.bundle == 'bp_columns' %}
  {{ attach_library('bootstrap_paragraphs/bp-columns') }}
{% endif %}
thejimbirch’s picture

Status: Fixed » Closed (fixed)