Build toolBuild tooltypeRuns at build time. Nothing of it ships in the deployed application.See every one →What this type is →by a community orgby a community orgoriginPublished by a community organisation, so it outlives any one maintainer.See every one →

ui5-task-flatten-library

A UI5 builder task that flattens a library's build output, removing the project namespace and resources folder for deployment to SAP NetWeaver, now also offered by the UI5 CLI itself.

SAP NetWeaver deployment expects a flat library package, but a normal UI5 library build nests output under a resources/<namespace>/ path. This task strips that prefix — turning dist/resources/my/lib/library.js into dist/library.js — while dropping test-resources files from the result and warning about any source file that falls outside the project's own namespace. Since @ui5/cli 3.8.0 the UI5 CLI's own build output styles, Flat and Namespace, offer the same restructuring natively, and the maintainer's README points migrating projects at that feature instead.

Facts

Latestv3.1.4ReleasedLast pushLicenceApache-2.0

Where it sits

Lives in
Provides
Build and dev-server toolingUI5Build and dev-server toolingcapabilityServing an app locally and building it for deployment — proxying a backend, transpiling, bundling, and shaping the result for whatever will host it.

Who is behind it

UI5 CommunityUI5 CommunityOrganisationMaintains this
In the atlas: maintains 69
@ui5-community
maintainerYavor IvanovPersonContributes to this
In the atlas: contributes to 17
@d3xter666
Florian VogtPersonContributes to this
In the atlas: contributes to 50, wrote 2
@flovogt
Marian ZeisPersonContributes to this
In the atlas: maintains 35, contributes to 86, wrote 25
@marianfoo
Matthias OßwaldPersonContributes to this
In the atlas: contributes to 29
@matz3
Peter MuessigPersonContributes to this
In the atlas: maintains 14, contributes to 80, wrote 1
@petermuessig
Merlin BeutlbergerPersonContributes to this
In the atlas: contributes to 18, wrote 1
@RandomByte
Jakob Marius KjaerPersonContributes to this
In the atlas: maintains 2, contributes to 24, wrote 1
@uxkjaer
Volker BuzekPersonContributes to this
In the atlas: maintains 7, contributes to 53, wrote 2
@vobu
8 contributors

What it declares

Every artifact

Type
Build tool
Origin
By a community org

As a build tool

Distributed through
npm

Connections1

Install

npm add ui5-task-flatten-library

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from ui5-community/ui5-ecosystem-showcase under Apache-2.0, read
ui5-community/ui5-ecosystem-showcase/packages/ui5-task-flatten-library/README.mdOn GitHub

UI5 task to flatten the library folder structure

👋 This is an open‑source, community‑driven project, developed and actively monitored by members of the UI5 community. You are welcome to use it, report issues, contribute enhancements, and support others in the community.

Task for ui5-builder, to prepare build result for deployment to SAP NetWeaver.

Prerequisites

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

Install

# Using npm
npm install ui5-task-flatten-library --save-dev

# Using pnpm
pnpm add --save-dev ui5-task-flatten-library

# Using yarn
yarn add --dev ui5-task-flatten-library

Usage

  1. Define the dependency in $yourapp/package.json:
"devDependencies": {
    // ...
    "ui5-task-flatten-library": "*"
    // ...
}
  1. configure it in $yourapp/ui5.yaml:
builder:
  customTasks:
    - name: ui5-task-flatten-library
      afterTask: generateResourcesJson

How it works

  • For src files it removes the /resources/${projectNamespace}/ part of the path (e.g. dist/resources/my/lib/library.js => dist/library.js)
  • All test files (/test-resources/) will be omitted from the build result
  • A warning is logged for src files that are not part of the project namespace

UI5 CLI Output Style

Starting from @ui5/cli version 3.8.0, the UI5 CLI introduces a new build option known as "Output Style." This feature allows developers to switch between various output styles when building their projects. Now you have the flexibility to omit both this project namespace and the “resources” directory. Imagine “/resources/sap/m/RangeSlider.js” transforming into “./RangeSlider.js.” This results in a flat build output.
The available output styles include:

  • Default: The default directory structure for every project type. For applications, this is identical to "Flat", and for libraries, it is "Namespace". Other types have a more distinct default output style.
  • Flat: Omits the project namespace and the "resources" directory.
  • Namespace: Respects the project namespace and the "resources" directory, maintaining the original structure.

To learn more about this feature and to migrate your project to the native Output Style feature instead of using the custom task, refer to the associated blog post or the CLI documentation page.

License

This work is licensed under Apache 2.0.

Built with care (and a lot of caffeine). If this helped you build, test, or ship, the next coffee — or drink — is on you when you bump into a contributor.

Apache-2.0, read

History

Latest

v3.1.4

Notes

Note: Version bump only for package ui5-task-flatten-library

  1. v3.1.3

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  2. v3.1.2

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  3. v3.1.1

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  4. v3.1.0

    Features 1

    Notes
    Features
    • enhanced v4 compat + update dependencies (#1070) (2d7ed16)
  5. v3.0.2

    Fixes 1

    Notes
    Bug Fixes
    • ui5-task-flatten-library: update readme with ui5 tooling cli information (5b9d5b7)
  6. v3.0.1

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  7. v3.0.0dated in the atlas

    Breaking 1, Features 2, Fixes 1

    Notes
    Bug Fixes
    Features
    BREAKING CHANGES
    • The support for UI5 Tooling V2 has been removed
  8. v0.3.1

    Fixes 1

    Notes
    Bug Fixes
    • implement determineRequiredDependencies for all tasks (#692) (d27b55e)
  9. v0.3.0

    Breaking 26, Features 1

    Notes
    Features
    BREAKING CHANGES
    • new package manager

    • refactor: updated tests to pass with pnpm

    • refactor: iasync still failing

    • feat(ui5-tooling-modules): support pnpm / node_modules symlinks

    • fix(ui5-app): make Karma work with pnpm

    • chore(ui5-app): remove uiveri5 from sample

    • chore(ui5-app): add updated wdio.conf

    • fix: make prettier and eslint work with pnpm

    • fix: fix cf_dest tests

    restructured tests and added node_modules as symlink

    • fix(ui5-app): adding eslint for wdio and mocha

    • chore(ui5-middleware-cfdestination): cleanup

    • feat(ui5-tooling-modules): add bundling support for AMD

    • chore(ui5-tooling-modules): cleanup

    • chore: fix code style

    • fix(ui5-task-flatten-library): support files without extensions

    • refactor: updated tests to pass with pnpm

    • feat(ui5-tooling-modules): support pnpm / node_modules symlinks

    • fix: make prettier and eslint work with pnpm

    • fix: update actions, lerna, vscode for pnpm

    • chore: only run test on tooling extensions

    • chore: use sequential tests for ava

    • chore: add @ui5/cli dev dependency for ava tests

    • chore: enable support for local act GH action tests

    • chore: add docu for local GitHub action execution

    • chore: docu cleanup

    • chore: re-add ncu scripts

    Co-authored-by: Peter Muessig peter.muessig@sap.com

  10. v0.2.7

    Fixes 1

    Notes
    Bug Fixes
    • ui5-task-flatten-library: support files without extensions (1aa61ee), closes #606
  11. v0.2.6

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  12. v0.2.5

    Other 1

    Notes
    Reverts
    • Revert "chore: add metadata to package.json for all packages for ui5-community website (#600)" (#601) (b6037d4), closes #600 #601
  13. v0.2.4

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  14. v0.2.3

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  15. v0.2.2

    Notes

    Note: Version bump only for package ui5-task-flatten-library

  16. v0.2.1

    Fixes 1

    Notes
    Bug Fixes
    • flatten-library: Ignore resources tagged as 'omit from build result' (7641241)
  17. v0.2.0

    Features 1

    Notes
    Features
    • flatten-library: flatten library in build result (#301) (00d63e2)
899downloads per week, npm
Weekly downloads for ui5-task-flatten-library26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 899.20 Apr – 26 Apr: 2,57727 Apr – 3 May: 2,4434 May – 10 May: 1,98511 May – 17 May: 2,30218 May – 24 May: 2,71225 May – 31 May: 1,8711 Jun – 7 Jun: 1,4228 Jun – 14 Jun: 1,70515 Jun – 21 Jun: 2,10622 Jun – 28 Jun: 2,28829 Jun – 5 Jul: 1,9686 Jul – 12 Jul: 2,29513 Jul – 19 Jul: 1,76220 Jul – 26 Jul: 1,75127 Jul – 2 Aug: 1,8733 Aug – 9 Aug: 1,59010 Aug – 16 Aug: 1,22817 Aug – 23 Aug: 1,76924 Aug – 30 Aug: 1,54731 Aug – 6 Sept: 1,5267 Sept – 13 Sept: 1,07414 Sept – 20 Sept: 1,49321 Sept – 27 Sept: 1,85128 Sept – 4 Oct: 2,0135 Oct – 11 Oct: 1,67112 Oct – 18 Oct: 899
Build and dev-server tooling
  1. UI5 ToolsVS Code extension to serve, proxy, build and deploy UI5 projects
  2. ui5-middleware-route-proxyUI5 server middleware proxying route prefixes to a backend
  3. ui5-task-cachebuster-indexingUI5 builder task preparing build output for the cachebuster
  4. ui5-task-transpile-genUI5 builder task transpiling ES6 to ES5 with Babel
  5. ui5-middleware-odata-recorderUI5 middleware recording OData traffic as mock server datasets
  6. ui5-plugin-loaderUI5 Tooling v4 extension that registers other extensions
  7. ui5-deployerUI5 Tooling module deploying Fiori/UI5 apps to SAP systems
  8. ui5-task-dts-generatorUI5 builder task generating d.ts type declarations
  9. ui5-task-minifierUI5 builder task minifying HTML, CSS and JSON files
  10. ui5-middleware-oidcUI5 dev server middleware adding an OpenID Connect login
  11. generator-ui5-library-af-deployYeoman generator for Application Frontend config in UI5 libraries
  12. ui5-middleware-destinationUI5 Tooling middleware proxying destinations and neo-app.json routes
  13. ui5-task-check-eocpUI5 build task warning when the app's UI5 version reaches EOCP
  14. @ui5/cliUI5 Tooling command line for project setup, dev server and build
  15. ui5-task-btp-manifestUI5 Tooling task writing the service name into the importer manifest
  16. ui5-middleware-approuterUI5 CLI middleware proxying the dev server through @sap/approuter
  17. ui5-middleware-capUI5 CLI middleware running a CDS server inside the UI5 dev server
  18. ui5-middleware-hmrExperimental UI5 middleware for hot module replacement
  19. ui5-middleware-iasyncUI5 middleware syncing interactions across browsers over websocket
  20. ui5-middleware-indexUI5 middleware serving a chosen welcome page at the root path
  21. ui5-middleware-livereloadLive reload middleware for the UI5 dev server
  22. ui5-middleware-oneloginUI5 middleware logging in with Playwright and reusing the session
  23. ui5-middleware-serveframeworkUI5 middleware serving a locally built UI5 framework
  24. ui5-middleware-servestaticUI5 middleware serving static resources from a path or npm package
  25. ui5-middleware-simpleproxyDev-server middleware proxying requests to a backend system
  26. ui5-middleware-ui5UI5 middleware including one UI5 application in another
  27. ui5-middleware-webjarsUI5 middleware serving static resources from JAR files (WebJars)
  28. ui5-middleware-websocketWebSocket support for Express-based dev servers such as UI5's
  29. ui5-task-cachebusterUI5 builder task cachebusting standalone UI5 applications
  30. ui5-task-copyrightUI5 builder task appending copyright headers to source files
  31. ui5-task-i18ncheckUI5 builder task checking XML views for missing i18n texts
  32. ui5-task-minify-xmlUI5 builder task minifying XML views and fragments
  33. ui5-task-pwa-enablerUI5 builder task turning a UI5 app into a progressive web app
  34. ui5-task-zipperBuild task packaging the UI5 build result as a zip archive
  35. ui5-tooling-lessUI5 CLI extension compiling Less files into CSS
  36. ui5-tooling-modulesUI5 tooling extensions loading npm packages as UI5 modules
  37. ui5-tooling-stringreplaceUI5 CLI extension for string replacement during the build
  38. ui5-tooling-transpileUI5 CLI extension transpiling code during the UI5 build
  39. @ui5/loggerInternal logger of the UI5 CLI
  40. @ui5/middleware-code-coverageUI5 CLI middleware for Istanbul code coverage
  41. @ui5/tooling-webcDeprecated UI5 Tooling extensions for UI5 Web Components wrappers

Details

Sources4
npm registrydiscovered herechecked
npm registry, ui5-task-flatten-libraryversion, releases, installschecked
packages/ui5-task-flatten-library/README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
latestv3.1.4
first release
releases and cadence18, ~126d median
discovered vianpm registry
first seen in the atlas
ecosystem and domainui5, developer-experience
Contributors8
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:ui5-community-ui5-task-flatten-library
JSON
/artifacts/ui5-community-ui5-task-flatten-library.json
MCP
Connecting an agent