Usage as an npm Dependency
These are the different ways to declare a dependency on ActiveUI SDK in your package.json
.
1) Local tgz File
This is the easiest and dirtiest way and it's how the ActiveUI Application is set up by default.
In your package.json
, providing activeui-sdk-4.2.12.tgz
is located in the same folder, add the following line to your dependencies
:
{
"dependencies": {
"...": "...",
"@activeviam/activeui-sdk": "file:./activeui-sdk-4.2.12.tgz",
"...": "..."
}
}
You can of course adapt the relative path if your tgz
file is located in a different folder.
The ActiveUI SDK
tgz
is a large binary file. We recommend to always "gitignore" it. Continue reading for better ways to depend on ActiveUI SDK.
2) Maven Integration
If you version your ActiveUI application in the same repository as your ActivePivot server, you can piggyback on your existing Maven build and pom.xml
file to depend on ActiveUI SDK.
This is what the activeui-sdk-4.2.12.jar
file is made for.
Compared to the local tgz
file approach, your package.json
would contain:
{
"dependencies": {
"...": "...",
- "@activeviam/activeui-sdk": "file:./activeui-sdk-4.2.12.tgz",
+ "@activeviam/activeui-sdk": "file:./target/dependency/META-INF/resources/activeviam/activeui-sdk",
"...": "..."
}
}
Head over to the Maven Integration page for more information on this.
3) Private npm Registry
ActiveUI SDK is a commercial library so it's not available on the public npm registry. However, you can use a private npm registry to depend on ActiveUI SDK like you would do with any other open source npm package.
This is the cleanest way to depend on ActiveUI SDK.
Private npm Registry Solutions
Here is a list of existing solutions offering a private npm registry you could use:
Using a Private npm Registry
Once you have access to a private npm registry with ActiveUI SDK published on it, apply the following change to your package.json
:
{
"dependencies": {
"...": "...",
- "@activeviam/activeui-sdk": "file:./activeui-sdk-4.2.12.tgz",
+ "@activeviam/activeui-sdk": "4.2.12",
"...": "..."
}
}