Our organization is building a component library where we add our components that are used on all our sites. For example we have a header and footer that we include on all our microsites. However, not all sites are built with Angular, so we have been looking into angular-elements
.
We've done a couple of test projects using angular-elements
, created a new project and outputted a button that can be used on any html page, technology agnostic. Super cool!
However, what are the best practices when it comes to building a component library using elements, are there any?
Our component library structure is as follow:
├── angular.json
├── CHANGELOG.md
├── component-lib
├── e2e
├── node_modules
├── package.json
├── README.md
├── src
├── tsconfig.json
├── tslint.json
└── yarn.lock
Where we have the demo page in the src/
folder and the components are in component-lib/
We build the component library with ng build component-lib
, this outputs this folder:
└── component-lib
├── bundles
├── designsystem-component-lib.d.ts
├── designsystem-component-lib.metadata.json
├── esm2015
├── esm5
├── fesm2015
├── fesm5
├── lib
├── package.json
├── public_api.d.ts
└── README.md
Is it possible to get the output as an angular-element
? Any resources that have done the same?