Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Support 3rd party aem component libraries #45

Closed
CodeByAlex opened this issue Mar 14, 2020 · 3 comments
Closed

Support 3rd party aem component libraries #45

CodeByAlex opened this issue Mar 14, 2020 · 3 comments
Labels

Comments

@CodeByAlex
Copy link
Member

Right now the htl engine works with custom components but not proxy components. We need to provide this capability so that people can use the core components

@CodeByAlex CodeByAlex added help wanted Extra attention is needed Feature labels Mar 14, 2020
@CodeByAlex CodeByAlex added this to the Publish V1.0.0 milestone Mar 14, 2020
@CodeByAlex
Copy link
Member Author

CodeByAlex commented Mar 15, 2020

@tripodsan from the Discord chat:

I think it should work like this:

  • we create a npm package that contains all the aem core components and stories. we already started this for Text,List,Accordion.

then a user you would:

  • npm add aem-core-components-storified
  • in components decorator: [ require('aem-core-components-storified').components]
  • in models decorator [ require(aem-core-components-storified).models]
    (something along those lines)

and then just use the normal sling:resourceSuperType in his custom component. and import / extends the model if he needs eg:

import Text from `aem-core-components.storified`.models;

class MyText extends Text {
}

@CodeByAlex CodeByAlex changed the title Support proxy components Support 3rd party aem component libraries Mar 16, 2020
@CodeByAlex
Copy link
Member Author

CodeByAlex commented Mar 29, 2020

The above however only supports a single library type - it would be great to support any 3rd party library...thinking of a solution for that. We can easily get the css and html for a component by making a one time call to a live aem instance using our cli tool ( we would have to add the capability) - but how would we get any information about the java models (assuming the libs are written using java models - if they are using javascript, it becomes very easy to include them)

@CodeByAlex
Copy link
Member Author

We now have a path forward to achieve this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant