ePages 6.11.0 - DE_EPAGES/Dojo/API/Shrinksafe.pm

Package DE_EPAGES::Dojo::API::Shrinksafe

This module provides an API for creating dojo shrinksafe builds.

@EXPORT_OK
RunDojoShrinksafe

Functions

RunDojoShrinksafe
UpdateChangedFiles
widgetFilePathToJSClass

RunDojoShrinksafe

This procedure creates the dojo shrinksafe build depending on its params.

Syntax
RunDojoShrinksafe($hParams);
Input
$hParams (ref.hash)
build parameters
  • StoreType - store type (required) - string
  • Profile - the used profile file (optional) - string
  • Version - dojo.version will contain this value (optional, default: 0.0.0.dev) - string
  • CustomReleaseDir - sets the release directory (optional) - string
  • HFFiles - file with list of changed js files or directory with changed files (optional) - string
  • ConsultingCartridge - cartridge with js files to override (optional) - string
  • ConfigFile - configuration file name (optional) - string
  • User - username for owner, i.e. 'ep_appl' (optional) - string
  • Group - username for owner, i.e. 'ep_web' (optional) - string

UpdateChangedFiles

Updates the content of the given $hHotFix hash ref. After aquiring the javascript class name from the given $HFFile javascript file name this string is searched for inside the list of dependencies inside the given shrinksafe layer. If found, the corresponding layer name and the actual javascript class is added to the changedFiles array - which later marks the list of changed files for the hotfix.

Syntax
%Hash = %{UpdateChangedFiles($FileName, $hLayer, $hConfigValues, \%Hash)};
Example
%HotFix = %{UpdateChangedFiles($HFFile, $hLayer, $hConfigValues, \%HotFix)};
Input
$HFFile (string)
javascript file name
$hLayer (ref.hash.string)
hash with the shrinksafe layer information
$hConfigValues (ref.hash.string)
configuration parameters of this script
$hHotFix (ref.hash.array)
hash with files and changedFiles list
Return
$hHotFix (ref.hash.array)
changed hash with files and changedFiles list

widgetFilePathToJSClass

Converts a file name like: "Cartridges/DE_EPAGES/Dojo/Data/Public/javascript/epages/widget/Elementlist.js" or "Cartridges/DE_EPAGES/MediaGallery/Data/javascript/widget/Filelistitem.js" or "U Cartridges/DE_EPAGES/MediaGallery/Data/javascript/widget/Filetree.js" into the corresponding javascript class name used in the layer dependencies like: "epages.widget.Elementlist" or "epages.cartridges.de_epages.mediagallery.widget.Filelistitem" "epages.cartridges.de_epages.mediagallery.widget.Filetree"

Syntax
my $JSClassName = widgetFilePathToJSClass($JSFileName);
Input
$AbsFileName (string)
string with the file name
Return
$Target (string)
javascript class name