adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
739 stars 746 forks source link

Release Core Components JS as npm modules #1367

Open jkoebner opened 3 years ago

jkoebner commented 3 years ago

For an improved integration of core components JS in an application that uses the core components, it would be very useful to have versioned NPM Modules of the Core Components' JS.

The @adobe namespace in npm could be used. The version of the components should be according to the core components release version. That would result, for example, in component names like:

@adobe/core/accordion/v1@2.13.4 @adobe/core/text/v1@2.13.4 @adobe/core/text/v2@2.13.4

This would be an easy step that helps a lot in integrating the components in modern FE build stacks.

The prerequisites for this are given because the js modules have a clean capsuled component scope. All the components would need is

bpauli commented 3 years ago

@jkoebner Thank you for submitting this enhancement request!

Maybe you can provide a PR which covers the conversion of the JS files into es6 modules as a first step?

jkoebner commented 3 years ago

@bpauli thank you for the feedback. i will try to provide the code in a way that integrates best with the repo and file structure and the component logic:

However, it would be important for me to know if it is possible to add an "npm publish" to the release pipeline. We can only make use of this feature if we can refer to the core components in our package.json and thus import them in the component js of the components that build up on the core components. Please let me know if you see any blockers for that.

jkoebner commented 3 years ago

To be more specific, the question refers to releasing the module defined in aem-core-wcm-components/content/package.json

bpauli commented 3 years ago

@jkoebner Thank you for reaching out. I don't see any blockers to add an npm publish to the release pipeline. Looking forward to your PR!

jkoebner commented 2 years ago

Hi @bpauli @vladbailescu - there was no update on the PR and no feedback. we would really love to have that feature and are able to contribute. Is there any feedback to the suggested solution - should we reiterate and update it? Having adobe core components as npm module would greatly improve flexibility for the frontends. BR and thank you for your feedback