Skip to content

Publishing Druid Libraries

WindBeneathYourWings edited this page Feb 9, 2022 · 7 revisions

Local Repo Setup

Add .npmrc file to project.

//localhost:4873/:_authToken="XXXXXXX"
@ng-druid:registry=http://localhost:4873/

This is currently using a local repository for initial testing.

https://verdaccio.org/

Build lib for prod

ng run {lib}:build:production

Publish lib

npm publish dist/{lib}

Scripts

  • bin/build_libs_prod.sh
    • Build all libraries for production or to publish to npm repository using Angular partial compilation
  • bin/publish_libs.sh
    • Publish all libs to npm repository

In the future these workflows will broken up into independent build processes probably using github actions. For the time being kiss using manual shell scripts.

Major disadvanage of the current shell scripts is it can be difficult to identify failures and creating a new lib requires adding it manually to these scripts below dependencies. there is probably a better way to do this possibly even use a dependency graph with introspection to coordinate the sequence of the lib builds. For now though push the libs so they can be shared in separate applications this works. The end goal is to share these libs with module federated applications right now.

Clone this wiki locally