Module: CKEditor5::Rails::Cdn::Concerns::BundleBuilder

Included in:
Editor::Helpers::Editor, Cdn::Helpers
Defined in:
lib/ckeditor5/rails/cdn/concerns/bundle_builder.rb

Instance Method Summary collapse

Instance Method Details

#create_preset_bundle(preset) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ckeditor5/rails/cdn/concerns/bundle_builder.rb', line 6

def create_preset_bundle(preset)
  preset => {
    cdn:,
    version:,
    translations:,
    ckbox:,
    premium:
  }

  bundle = build_base_cdn_bundle(cdn, version, translations)
  bundle << build_premium_cdn_bundle(cdn, version, translations) if premium
  bundle << build_ckbox_cdn_bundle(ckbox) if ckbox
  bundle << build_plugins_cdn_bundle(preset.plugins.items)
  bundle
end