3.0.3 • Published 3 months ago

ui5-task-minify-xml v3.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

UI5 task for minifying XML resources (like views, fragments, etc.)

:wave: This is a community project and there is no official support for this package! Feel free to use it, open issues, contribute, and help answering questions.

Task for ui5-builder, enabling XML minification based on minify-xml.

Prerequisites

:warning: UI5 Tooling Compatibility All releases of this tooling extension using the major version 3 require UI5 Tooling V3. Any previous releases below major version 3 (if available) also support older versions of the UI5 Tooling. But the usage of the latest UI5 Tooling is strongly recommended!

Install

npm install ui5-task-minify-xml --save-dev

Configuration options (in $yourapp/ui5.yaml)

  • minifyOptions: Object all options available from the minify-xml plugin, with one additional (non-compliant) collapseWhitespaceInAttributeValues (boolean) option, due to UI5 having a lot of options (e.g. with JSON values) where collapsing whitespace is beneficial. defaults to all standard options of minify-xml and collapseWhitespaceInAttributeValues enabled.

  • fileExtensions: String|Array<String> the file extensions to glob for. defaults to xml.

  • excludePatterns: Array<String> array of paths inside $yourapp/ to exclude from the minification, e.g. 3-rd party libs in lib/*. defaults to an empty array [].

Usage

  1. Define the dependency in $yourapp/package.json:
"devDependencies": {
    // ...
    "ui5-task-minify-xml": "*"
    // ...
}
  1. configure it in $yourapp/ui5.yaml:
builder:
  customTasks:
  - name: ui5-task-minify-xml
    afterTask: replaceVersion
    configuration:
      minifyOptions:
        removeComments: true
        collapseEmptyElements: true
        collapseWhitespaceInAttributeValues: true
        # ... further minify-xml attributes
      fileExtensions:
      - "xml"
      - "edmx"
      excludePatterns:
      - "lib/"
      - "another/dir/in/webapp"
      - "yet/another/dir"

License

This work is licensed under the Apache 2.0 license.

3.0.3

3 months ago

3.0.2

5 months ago

3.0.1

7 months ago

3.0.0

10 months ago

0.3.1

1 year ago

0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.1

3 years ago

0.2.2

3 years ago

0.2.0

3 years ago