ui5-task-transpile
A UI5 Tooling task that transpiles TypeScript, ES modules and other ES6+ sources during the build so the UI5 runtime can load them.
UI5 task for transpiling ES6+ sources
Facts
Where it sits
Who is behind it
In the atlas: maintains 69@ui5-communitymaintainerAdrian BobevContributes to this
In the atlas: contributes to 10@adrian-bobevAttila BorosContributes to this
In the atlas: contributes to 6@attila-borosBenjamin ReimContributes to this
In the atlas: contributes to 9@BenReimChristian GeorgiContributes to this
In the atlas: maintains 1, contributes to 53@chgeoFrank WeigelContributes to this
In the atlas: contributes to 10@codeworriorDavid SooterContributes to this
In the atlas: contributes to 9@d-sooterYavor IvanovContributes to this
In the atlas: contributes to 17@d3xter666Austin DevineContributes to this
In the atlas: maintains 7, contributes to 25@devineaDimitar FenerskiContributes to this
In the atlas: contributes to 23@dfenerskiDominik FeiningerContributes to this
In the atlas: contributes to 11@dominikfeininger58 contributors
What it declares
Every artifact
- Type
- Build tool
- Origin
- By a community org
- Runtime
- Node.js
As a build tool
- Distributed through
- npm
Connections
Writing UI5 apps and libraries in TypeScript
Download
Install
npm add ui5-task-transpileDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from ui5-community/ui5-ecosystem-showcase under Apache-2.0, readUI5 task for transpiling ES6+ sources
Task for ui5-builder, enabling transpiling.
⚠️ The ui5-task-transpile has been deprecated and replaced with the ui5-tooling-transpile-task. Please check out the tooling extensions from ui5-tooling-transpile.
Install
npm install ui5-task-transpile --save-dev
Configuration options (in $yourapp/ui5.yaml)
-
debug:
true|false
verbose logging -
removeConsoleStatements:
true|false
remove console statements while transpiling using Babel plugin -
excludePatterns:
String<Array>
array of paths inside$yourapp/webapp/to exclude from live transpilation,
e.g. 3-rd party libs inlib/* -
transpileAsync:
true|false
transpilingasync/awaitusing this Babel plugin, which doesn't require
the regenerator runtime (Issue #242) -
babelConfig:
Objectobject to use as configuration for babel instead of the
default configuration defined in this middleware
Usage
- Define the dependency in
$yourapp/package.json:
"devDependencies": {
// ...
"ui5-task-transpile": "*"
// ...
},
"ui5": {
"dependencies": [
// ...
"ui5-task-transpile",
// ...
]
}
As the devDependencies are not recognized by the UI5 tooling, they need to be listed in the
ui5 > dependenciesarray. In addition, once using theui5 > dependenciesarray you need to list all UI5 tooling relevant dependencies.
- configure it in
$yourapp/ui5.yaml:
builder:
customTasks:
- name: ui5-task-transpile
afterTask: replaceVersion
configuration:
debug: true
removeConsoleStatements: true
transpileAsync: true
excludePatterns:
- "lib/"
- "another/dir/in/webapp"
- "yet/another/dir"
How it works
The task can be used to transpile ES6+ JavaScript code to ES5 by using babel.
Extending the default configuration (in $yourapp/babel.config.json)
If you want to further customize the transpiling options you can do so by creating a babel config file babel.config.json in your project directory. Babel will automatically pick up the configuration and apply it. The default configuration from this task will still be applied.
Example
An example configuration is as follows:
{
"plugins": [
["@babel/plugin-transform-for-of", { "assumeArray": true }],
["@babel/plugin-transform-computed-properties", { "loose": true }],
["@babel/plugin-transform-destructuring", { "loose": true }]
]
}
Additional dependencies
If you need dependencies not included in this task you have to install them in your project in order to be able to use them.
Override babel configuration (in $yourapp/ui5.yaml)
You can override the default babel configuration from this package by including an object babelConfig in this task's configuration. If such an object is given the default configuration from this task will not be considered, but only the configuration given in ui5.yaml will be used.
Example
builder:
customTasks:
- name: ui5-task-transpile
afterTask: replaceVersion
configuration:
excludePatterns:
- "lib/"
babelConfig: &babelConfig
plugins:
- - "@babel/plugin-transform-computed-properties"
- loose: true
- - "@babel/plugin-transform-for-of"
- assumeArray: true
presets:
- - "@babel/preset-env"
- targets:
browsers: "last 2 versions, ie 10-11"
Hint: if you also use use
ui5-middleware-livetranspileyou probably do not want to duplicate the babel configuration in yourui5.yaml. Use YAML anchors in order to reference the babel configuration across theui5.yamlfile. In the example above the anchor&babelConfigdefines the babel configuration ofui5-task-transpileand may be re-used in other parts ofui5.yamlby using the alias*babelConfig:server: customMiddleware: - name: ui5-middleware-livetranspile afterMiddleware: compression configuration: babelConfig: <<: *babelConfig sourceMaps: "inline"
Additional dependencies
If you need dependencies not included in this task you have to install them in your project in order to be able to use them.
License
This work is dual-licensed under Apache 2.0 and the Derived Beer-ware License. The official license will be Apache 2.0 but finally you can choose between one of them if you use this work.
When you like this stuff, buy @vobu a beer or buy @pmuessig a coke when you see them.
History
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
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
-
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Notes
Note: Version bump only for package ui5-task-transpile
Others providing
Compare all 7 on the TypeScript support page →- ui5-task-dts-generatorui5-task-dts-generatorA UI5 builder task that generates d.ts files, TypeScript type declarations, during the build of a UI5 library written in JavaScript, by wrapping @ui5/dts-generator.independent, ui5UI5 builder task generating d.ts type declarationsfrom UI5
- @openui5/sap.ui.core@openui5/sap.ui.coreThe OpenUI5 core: the module loader, the MVC runtime, data binding, routing, theming and the test stack, which is everything a UI5 app does before a single community package is added.sap official, ui5Framework core: module loader, MVC runtime, binding, routing, themingfrom UI5
- babel-preset-transform-ui5babel-preset-transform-ui5A Babel transformer that converts modern ECMAScript or TypeScript UI5 code (ES modules and classes) into the sap.ui.define and Control.extend syntax the UI5 loader expects.community org, ui5Babel transformer from modern ES or TypeScript to UI5 module syntaxfrom UI5
- @ui5-community/jsx-runtime@ui5-community/jsx-runtimeA plugin-based JSX runtime for UI5: views are written as .tsx files with per-control typing, and the JSX compiles to plain new Control(settings) calls.community org, ui5Plugin-based JSX runtime for UI5 views written as .tsxfrom UI5
- @ui5/mcp-server@ui5/mcp-serverSAP's MCP server for UI5 development: ten tools that scaffold an app or a card, read the project in front of the agent, and run the linter and the manifest validator against it.sap official, ui5MCP server for UI5 development with ten toolsfrom UI5
- @ui5/webcomponents@ui5/webcomponentsSAP's UI elements as standard custom elements, ui5-button among them, implementing SAP Fiori design and usable from plain HTML, React, Angular or Vue.sap official, ui5SAP's UI elements as standard custom elementsfrom UI5
Details
Sources
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
Contributors
Show 34 more
History in the atlas
- First seen.
For your agent
- Ref
artifact:ui5-community-ui5-task-transpile- JSON
- /artifacts/ui5-community-ui5-task-transpile.json
- MCP
- Connecting an agent