e-picsa / picsa-apps

Monorepo for building tools to support E-PICSA Apps
https://picsa.app
GNU General Public License v3.0
6 stars 2 forks source link

[frontend: webcomponents] Publish webcomponents to npm #97

Closed chrismclarke closed 1 year ago

chrismclarke commented 1 year ago

What

Add build scripts/pipeline to handle publishing of the webcomponents in lib/webcomponents to npm, ideally with support for angular package integration (like in lib/webcomponents-ngx).

Why

When running the repo locally the webcomponents must first be build before they can be imported, and will throw an error if trying to run without build.

image

Similarly if the webcomponents have been updated developers will need to manually re-trigger build to see reflected changes.

By publishing the components to npm we can include in the package.json and so will be installed on first yarn install. This should fix the first-time run experience (although will still need updated yarn install to include changes)

As an additional bonus, components like the survey-form integration could be made available for use in other projects

How

Possibly create a standalone repo, or github action Will likely follow a similar model to ionic components, with specific import for /ngx

Useful links/tools:

Additional links:

Alternative options

Could add a script to manually check if components are built and call before start script (some sort of devEnvCheck.js or similar)

chrismclarke commented 1 year ago

Resolved for now with ff0b11b9a3aa4ca4d44cf0f87a68e58f0c2e1e5b , can revisit in the future if still interested to publish