
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ui5-task-copy-shim-resources
Advanced tools
custom ui5 task for copying runtime shim resources at build time
Custom UI5 task for copying runtime shim resources at build time.
This is especially useful if you have some ProjectShims e.g. for npm dependencies which should also be available in final the build.
Make sure your project is using the latest UI5 Tooling.
Add the custom task as development dependency to your project.
With yarn
:
yarn add -D ui5-task-copy-shim-resources
Or npm
:
npm i -D ui5-task-copy-shim-resources
Additionally the custom task needs to be manually defined as a ui5 dependency in your project's package.json
:
{
"devDependencies": {
"ui5-task-copy-shim-resources": "^0.1.0"
},
"ui5": {
"dependencies": [
"ui5-task-copy-shim-resources"
]
}
}
Register the custom task in your project's ui5.yaml
under builder/customTasks
:
specVersion: "2.2"
metadata:
name: my-app
type: application
# ...
# further configuration
# ...
builder:
customTasks:
- name: ui5-task-copy-shim-resources
afterTask: replaceVersion
configuration:
paths:
- "/thirdparty/core-js-bundle/minified.js"
- "/thirdparty/regenerator-runtime/runtime.js"
globs:
- "/thirdparty/lodash/*.js"
# ...
# further configuration
# ...
---
# Shims for thirdparty modules
specVersion: "2.2"
kind: extension
type: project-shim
metadata:
name: thirdparty-shims
shims:
configurations:
# polyfill for ECMAScript features
core-js-bundle:
specVersion: "2.2"
type: module
metadata:
name: core-js-bundle
resources:
configuration:
paths:
/thirdparty/core-js-bundle/: ""
# transpile generator functions (~ async await)
regenerator-runtime:
specVersion: "2.2"
type: module # Use module type
metadata:
name: regenerator-runtime
resources:
configuration:
paths:
/thirdparty/regenerator-runtime/: ""
# lodash utility library
lodash:
specVersion: "2.2"
type: module
metadata:
name: lodash
resources:
configuration:
paths:
/thirdparty/lodash/: ""
Simply run e.g. ui5 build --clean-dest
to copy your runtime resources during build time.
Once the build is completed the copied resources will available in the dist
folder.
The custom task accepts the following configuration
options:
name | type | Description | mandatory | default | examples |
---|---|---|---|---|---|
enabled | boolean | enable/disable the custom task | no | true | true , false |
debug | boolean | enable/disable debug logs | no | false | true , false |
paths | string[] | paths for resources to be copied | no | [] | [ "some/resource/path.js" ] |
files | string[] | glob pattern for resources to be copied | no | [] | [ "some/resource/glob/**/*.js" ] |
builder:
customTasks:
- name: ui5-task-copy-shim-resources
afterTask: replaceVersion
configuration:
enabled: true
debug: true
paths:
- "/thirdparty/core-js-bundle/minified.js"
- "/thirdparty/regenerator-runtime/runtime.js"
globs:
- "/thirdparty/lodash/*.js"
Please have look at bookshop-ui.
FAQs
custom ui5 task for copying runtime shim resources at build time
The npm package ui5-task-copy-shim-resources receives a total of 809 weekly downloads. As such, ui5-task-copy-shim-resources popularity was classified as not popular.
We found that ui5-task-copy-shim-resources demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.