Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempt to publish
geonetwork-ui
librarues as npm packages using Nx publishable targets.eg.
nx g @nrwl/angular:library ui/blabla --publishable=true --importPath=@gnui/ui-blabla
In this PR, 2 new libs
npm-publishable
which includesnpm-publishable-dep
ui-widgets
(renamed from@geonetwork-ui/ui/widgets
to@geonetwork-ui/ui-widgets
)util-shared
and third party libraries (ngx-translate
,@angular/material
...)So
npm-publishable
library is the entry point in this case for the third party angular application.To make it
buildable
&publishable
, all dependencies must bepublishable
as well. Soutil-shared
andui-widgets
configuration files have been modified too (project.json
,package.json
....).geonetwork-ui
internal libraries depends on third party libraries that must be included in the package dependencies. I choose to add them asdependencies
instead ofpeerDependencies
.Build libraries
nx build npm-publishable
Publish libraries
npm i -g yalc
from all library build package folders (eg.
dist/libs/npm/publishable
) runyalc publish
Create the host app
nx ng new gnui-host
add dependencies from host
yalc add @gnui/publishable @gnui/publishable-dep @geonetwork-ui/util-shared @geonetwork-ui/ui-widgets
npm i
to install the deps of the depsThen include the module dependency, the
<gnui-random>
component and serve the application.To continue
npm init
thing to add all deps at once from the third party app