{"id":18324685,"url":"https://github.com/flovogt/ui5-external-library","last_synced_at":"2025-10-23T22:58:12.190Z","repository":{"id":136837601,"uuid":"328708920","full_name":"flovogt/ui5-external-library","owner":"flovogt","description":"UI5 sample app including an external library","archived":false,"fork":false,"pushed_at":"2023-10-30T10:17:43.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T00:31:59.755Z","etag":null,"topics":["open-source","openui5","ui5"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flovogt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-11T15:31:34.000Z","updated_at":"2024-05-21T01:04:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7c5881a-6f96-4d7e-8d5e-241ff1ff2e55","html_url":"https://github.com/flovogt/ui5-external-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flovogt/ui5-external-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flovogt%2Fui5-external-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flovogt%2Fui5-external-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flovogt%2Fui5-external-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flovogt%2Fui5-external-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flovogt","download_url":"https://codeload.github.com/flovogt/ui5-external-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flovogt%2Fui5-external-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280706841,"owners_count":26376990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["open-source","openui5","ui5"],"created_at":"2024-11-05T18:35:31.101Z","updated_at":"2025-10-23T22:58:12.158Z","avatar_url":"https://github.com/flovogt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UI5 External Library\nThis project shows how easy it is to use an already hosted custom thirdparty javascript library in an UI5 application.\n\nThe magic happens in [Component.js](webapp/Component.js) where you have to configure a shim in the *UI5 Loader*:\n\n```javascript\n  // Provides a shim for the lodash library\n  sap.ui.loader.config({\n    paths: {\n      \"custom/Lodash\": \"https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.20/lodash.min\"\n    },\n    shim: {\n      \"custom/Lodash\": {\n        amd: true,\n        exports: \"_\"\n      }\n    }\n  });\n```\n\nThen you can use the external javascript library like you know it already from other UI5 artefacts. See [Home.controller.js](webapp/controller/Home.controller.js).\n\n```javascript\nsap.ui.define([\n  \"sap/ui/core/mvc/Controller\",\n  \"custom/Lodash\"\n], function (Controller, Lodash) {\n  \"use strict\";\n\n  return Controller.extend(\"com.ui5.test.ui5ExternalLibrary.controller.Home\", {\n\n    onInit: function () {\n\n      // call the thirdparty module via the path mapping\n      var iResult1 = Lodash.divide(10, 2);\n\n      // call the thirdparty module via the global namespace\n      var iResult2 = _.divide(10, 2);\n    }\n  });\n});\n```\n\n# Development\nTo run this UI5 application locally follow these steps:\n1. Open the terminal and execute `npm i` in the root folder\n2. Execute `npm start` in the terminal","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflovogt%2Fui5-external-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflovogt%2Fui5-external-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflovogt%2Fui5-external-library/lists"}