close

Filter

loading table of contents...

Release Notes / Version 10.2107

Table Of Contents

Unified Javascript, Sass and Freemarker utilities into new brick Utils

All utilities for Javascript, Sass and Freemarker have been moved from the /lib folder to the new API brick called "Utils". Therefore the dependencies in your themes and bricks and the includes in your templates need to be updated.

Update Steps:

  • Change every occurrence of the following dependencies in the package.json files of your theme or brick to only one "@coremedia/brick-utils": "^1.0.0" :

    • "@coremedia/js-basic": "^1.0.0"

    • "@coremedia/js-jquery-utils": "^1.0.0"

    • "@coremedia/js-logger": "^1.0.0"

    • "@coremedia/js-utils": "^1.0.0"

    • "@coremedia/ftl-utils": "^1.0.0"

    • "@coremedia/sass-utils": "^1.0.0"

  • every import in a Javascript file from the JS libraries (basic, utils, jquery-utils, logger) need to be adapted. If there are now multiple, they can be combined. For example:

    • {{import { EVENT_LAYOUT_CHANGED } from "@coremedia/js-basic";}}

{{import { ajax, findAndSelf } from "@coremedia/js-jquery-utils";}} becomes {{import { EVENT_LAYOUT_CHANGED, ajax, findAndSelf } from "@coremedia/brick-utils";}}

  • every import in a freemarker template to the ftl utilities also need to be rewritten to the new utils brick:

    • <#import "*/node_modules/@coremedia/ftl-utils/src/freemarkerLibs/components.ftl" as components />

becomes <#import "*/node_modules/@coremedia/brick-utils/src/freemarkerLibs/components.ftl" as components />

(CMS-15043)

Search Results

Table Of Contents