Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

CMF MES 7.1.0

Compare
Choose a tag to compare
@jpsfs jpsfs released this 03 Jan 15:41
· 56 commits to master since this release
d2d6781

Features

  • Package bundling
    Regarding the improvements on CMF MES startup time, it was made some changes to aggregate files and static resources (like css, js, fonts, etc.) within bundles.
    • How it works? in each web project (within gulfile.js), the developer can specify which bundles should be created and which paths should be included in each bundle (bu.json).

    • Where we load the bundles ? Is responsibility of each development team. By default, the vital bundles are configured in core solution bootstrap.

    • Ex. (Gulp File):

// Define if the compiler will make bundles or not
isBundleBuilderOn: true,
// The bundle configuration are attached with systemjs builder restrictions ( In this case, the configuration only matters for system js bundles )
bundleBuilderInitialConfig: "systemjsbuilderconfig.js",
// Which bundles will be created and what is their configuration file
bundleBuilderConfigFiles: [
	...
	{
		bundleName: 'cmf.js',
		// By default, the bundle will be minified (true)
		bundleMinify: false,
		bundleConfigs: ["./bu.json"]
	},
	{
		bundleName: 'external_static.js',
		bundleConfigs: ["./bu.json"]
	}
	...
],
// Which static assets should be copied and where
bundleBuilderAssetsConfig: [
	{
		bundleAssetsTask: 'core_fonts',
		bundleConfigs: ["./bu.json"],
		bundleDestPath: "node_modules/bundles/css/style/fonts/"
	},
...]
 * **Ex (Bundle Config File):**
    * **bundleExpressions** are computed by systemjs builder.*
    * **bundlePaths** are relative paths for static files*
    * **bundleAssetsTask** is a kind of task for copy files only*
{
    "bundlesConfiguration": [
	...
         {
            "bundleName": "external_static.js",
            "bundlePaths": [
                "node_modules/jquery/dist/jquery.min.js",
                "node_modules/webcomponentsjs/lite.js",
                "node_modules/core-js/client/shim.min.js",
                ..
            ]
        },
        {
            "bundleAssetsTask": "style_fonts",
            "bundlePaths": [
                "node_modules/cmf.style/assets/fonts/**/*.woff",
                "node_modules/cmf.style/assets/fonts/**/*.sfd",
                "node_modules/cmf.style/assets/fonts/**/*.svg",
                "node_modules/cmf.style/assets/fonts/**/*.ttf"
            ]
        },
        {
            "bundleName": "kendo.js",
            "bundleExpressions": "[node_modules/cmf.kendoui/js/kendo.*.min.js]"
        }
    ...]
}

Bug Fix

  • URL Match: Changed the match expression of URLs to only redirect to index.html those which don't end on . (are files)