Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Core Components JS as npm modules #1367

Open
jkoebner opened this issue Jan 25, 2021 · 5 comments · May be fixed by #1397
Open

Release Core Components JS as npm modules #1367

jkoebner opened this issue Jan 25, 2021 · 5 comments · May be fixed by #1397
Labels
enhancement New feature, or improvement to an existing feature.
Milestone

Comments

@jkoebner
Copy link
Contributor

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

  • an .npmrc per js file
  • an export default at the end of the js or a plugin that converts plain js into es6 modules
  • an integration of this module release in the build job and finally in the build pipelines
@bpauli bpauli added the enhancement New feature, or improvement to an existing feature. label Jan 26, 2021
@bpauli bpauli added this to the 3.0.0 milestone Jan 26, 2021
@bpauli
Copy link
Contributor

bpauli commented Jan 26, 2021

@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
Copy link
Contributor Author

jkoebner commented Feb 4, 2021

@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:

  • Core Components Content Module receives a main entry point that exports all modules
  • Components will receive a file that imports them and converts / exports as es6 modules
  • Components can be selected from main js entry point

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
Copy link
Contributor Author

jkoebner commented Feb 4, 2021

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

@bpauli
Copy link
Contributor

bpauli commented Feb 5, 2021

@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 jkoebner linked a pull request Feb 15, 2021 that will close this issue
@vladbailescu vladbailescu modified the milestones: 3.0.0, Major Apr 9, 2021
@jkoebner
Copy link
Contributor Author

jkoebner commented Feb 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, or improvement to an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants