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

Convert to NPM module / change publishing procedure #2130

Open
alansemenov opened this issue Sep 14, 2021 · 0 comments
Open

Convert to NPM module / change publishing procedure #2130

alansemenov opened this issue Sep 14, 2021 · 0 comments
Labels
Refactoring Code improvements To Be Discussed Something must be discussed with developers

Comments

@alansemenov
Copy link
Member

alansemenov commented Sep 14, 2021

When an application that uses lib-admin-ui is built in dev mode, Gradle first builds lib-admin-ui locally, then creates a JAR file, then triggers the build of the app itself, which unpacks lib-admin-ui's JAR file and uses its resources in the build.
This is inefficient because in this case we could simply use lib-admin-ui resources directly, without spending time to build, then unpack the JAR file.
lib-admin-ui should be changed to an ordinary NPM module that is published to the NPM registry every time we release a new version. A SNAPSHOT of lib-admin-ui should be deployed to an NPM registry in our Artifactory (we can then remove it from Maven repository).

So, to sum up.

Changes in lib-admin-ui:

  1. lib-admin-ui should be made to an NPM module (under @enonic namespace).
  2. We should set up NPM registry in the Artifactory which will store the snapshots.
  3. Publishing of lib-admin-ui should be changed to publish snapshots to the Artifactory's NPM registry and publish releases to the central NPM registry.

Changes in apps that are using lib-admin-ui (requires additional tasks):

  1. Build in the dev mode should be changed to access lib-admin-ui resources directly, if they exist locally. JAR should not be needed.
  2. If an app is using a SNAPSHOT of lib-admin-ui, it should be fetched from our Artifactory's NPM registry.
  3. Otherwise lib-admin-ui should be fetched as an ordinary NPM module from the central NPM registry.
@alansemenov alansemenov added To Be Discussed Something must be discussed with developers Refactoring Code improvements labels Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Code improvements To Be Discussed Something must be discussed with developers
Projects
None yet
Development

No branches or pull requests

1 participant