Registry / devops / ui5-task-minifier

ui5-task-minifier

JSON →
library2.0.1jsnpmunverified

Custom UI5 builder task for minifying HTML, CSS, and JSON files during the SAPUI5/OpenUI5 build process. Current stable version is 2.0.1. The package fills a gap in the default ui5-builder which does not minify these file types. It integrates via the ui5.yaml configuration, supports selective minification per file type (html, css, json), and uses standard minification libraries. Released under MIT license. Regular updates follow ui5-builder releases.

npm install ui5-task-minifier
INSTALL
IMPORT
SIG · UI5-TASK-MINIFIER
U
ui5-task-minifier
devopsjavascriptv2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ui5-task-minifier
No JS import; configured in ui5.yaml as custom task.
No import needed; do not require('ui5-task-minifier') in your JavaScript code.
This is a build tool, not a library. Use via YAML configuration.

Shows how to configure the task in ui5.yaml to minify HTML and CSS but skip JSON.

// No JavaScript code; configure in ui5.yaml // $yourapp/ui5.yaml builder: customTasks: - name: ui5-task-minifier afterTask: minify configuration: html: true css: true json: false
Debug
Known issues
breakingVersion 2.x requires ui5-builder >= 2.0.0. Compatibility with older versions is broken.
fix
Upgrade ui5-builder to >=2.0.0 or stay on ui5-task-minifier 1.x.
affects: <2.0.0
gotchaThe afterTask must be 'minify' (default ui5-builder task). Placing it after other tasks may cause orders issues.
fix
Ensure afterTask is set to 'minify'.
affects: all
deprecatedConfiguration options (html, css, json) are boolean but default to true; omitting them still minifies all types.
fix
Explicitly set false for types you want to skip to avoid unintended minification.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'html-minifier'
Missing dependency due to npm hoisting or incomplete installation.
fix
Delete node_modules and package-lock.json, then run npm install.
UI5 build fails: 'ui5-task-minifier' is not a valid custom task
The task name in ui5.yaml does not match the package name exactly.
fix
In ui5.yaml, use name: ui5-task-minifier (must match the npm package name).
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
uglify-jsrequiredUsed for minification of CSS and JSON? Actually HTML minification uses html-minifier, CSS uses cssmin? The package depends on multiple minifiers. Based on package.json: html-minifier, cssmin, uglify-js? Need to check. Assuming it bundles them.
Agent activity
2 hits · last 30 days
node
2
Resources
ui5-task-minifier — npm install ui5-task-minifier · libregistry