{"id":19332504,"url":"https://github.com/yuchi/frontend-resources-osgi","last_synced_at":"2025-11-16T15:31:34.839Z","repository":{"id":70078955,"uuid":"45203042","full_name":"yuchi/frontend-resources-osgi","owner":"yuchi","description":"A discussion about OSGi, Liferay and Front-end","archived":false,"fork":false,"pushed_at":"2015-11-15T15:08:18.000Z","size":137,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-13T19:19:15.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-29T18:35:43.000Z","updated_at":"2022-09-13T20:56:49.000Z","dependencies_parsed_at":"2023-03-10T12:30:31.258Z","dependency_job_id":null,"html_url":"https://github.com/yuchi/frontend-resources-osgi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Ffrontend-resources-osgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Ffrontend-resources-osgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Ffrontend-resources-osgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuchi%2Ffrontend-resources-osgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuchi","download_url":"https://codeload.github.com/yuchi/frontend-resources-osgi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240434298,"owners_count":19800550,"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","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":[],"created_at":"2024-11-10T02:46:14.656Z","updated_at":"2025-11-16T15:31:34.757Z","avatar_url":"https://github.com/yuchi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Runtime Front-end (Web) Resources and Dependencies\n\nDuring Liferay DEVCON 2015 some interesting topics spurred out of the new Liferay Theme build process.\n\nThis document, and the expected following discussion, is here to understand how we can guarantee for web front-end engineers a friendly development environment and a **_de-facto_ standards** adherent runtime.\n\n### Must-reads\n\n\u003e [To Know for Java-ists](To_know_for_javaists.md) (unfinished)\n\n\u003e To Know for JavaScript-ists\n\n\u003e Extended Goals\n\n\u003e Proposal\n\n### Synopsis\n\nAt Liferay DEVCON 2015 a [new way to build Liferay Themes][ltt] has been announced. It is built around [gulp][gulp] tasks and offers the concept of *Themelets*, composable features distributable through [npm][npm]. Themelets are then merged in your own theme at build time.\n\nNo explicit statement from the user (other than the installation of the Themelet itself) is required for the changes to take effect. The build process **owns** the concept of Themelets.\n\nThe discussion started around the fact that while Themelets are distributed through npm, **they are not _good npm citizens_**, we are using **npm as a centralized storage system** with a nice retrieval and versioning command-line util.\n\nWhat a front-end engineer would expect is something different, and that’s dependency management. A small piece of code is worth a thousand words:\n\n```js\n// liferay-themelet-sticky-dockbar/index.js\nimport Sticky from 'a-sticky-polyfill-on-npm';\nexport default new Sticky('#dockbar');\n\n// liferay-themelet-sticky-dockbar/package.json\n{\n  \"name\": \"liferay-themelet-sticky-dockbar\",\n  \"version\": \"0.1.0\",\n  \"dependencies\": {\n    \"a-sticky-polyfill-on-npm\": \"^1.0.2\"\n  }\n}\n```\n\nThis is currently **out of scope** of the new Theme build process.\n\nWe think it **should** and that it should encompass the **whole front-end development experience on Liferay**.\n\n[ltt]: https://www.npmjs.com/package/liferay-theme-tasks\n[gulp]: http://gulpjs.com/\n[npm]: https://www.npmjs.com/\n\n### Goals\n\n1. Let front-end engineers use **their favorite package manager** for Liferay Themes **and** Apps (aka Portlets) development.\n2. Provide a **preferred distribution path** for Liferay-oriented packages (e.g. Themelets.)\n3. Guarantee the support for current **common scenarios** (e.g. deduplication of packages, conflict management), **common practices** (polyfills, global-pulluting-things) and **libraries/frameworks** (e.g. Metal.js, Angular, React).\n4. Identify the **module system** to be used and define eventual **compatibility paths**.\n5. Define the boundaries for **forward-compatibility** of the designed system.\n\n### Prior art and references\n\n##### Papers and specs:\n\n- OSGi™ Alliance — [RFP-171 Web Resources (PDF)][RFP-171-pdf] [(ODT)][RFP-171-odt]\n- [Node.js module resolution algorithm](https://nodejs.org/api/modules.html)\n- [Bower definition file specification, aka `bower.json`](https://github.com/bower/spec/blob/master/json.md)\n\n[RFP-171-pdf]: https://github.com/osgi/design/raw/master/rfps/rfp-0171-Web-Resources.pdf\n[RFP-171-odt]: https://github.com/osgi/design/raw/master/rfps/rfp-0171-Web-Resources.odt\n\n##### Other stuff:\n\n- Webpack’s [code-splitting features](https://webpack.github.io/docs/code-splitting.html)\n- Webpack’s [comparison page](https://webpack.github.io/docs/comparison.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchi%2Ffrontend-resources-osgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuchi%2Ffrontend-resources-osgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuchi%2Ffrontend-resources-osgi/lists"}