Closed marius-dgmd closed 3 months ago
Hi @marius-dgmd, good questions! Here are some answers, and you're right that documentation is lacking here:
deploymentConfigs
field in the package.json
file is used to tell LPM which Automation Studio configuration newly added packages should be deployed to (i.e. to the cpu.sw file). If this field is missing or empty, LPM will simply add package content to the Logical View, without deploying to any cpu.sw
file. If there are one or more strings in this field, LPM also deploys the contents to those configurations. Note that LPM prompts you to choose which configuration to deploy to when you call init
. You can also edit this setting in the package.json
directly at any time, for instance:
"lpmConfig": {
"deploymentConfigs": [
"APC3100Cfg",
"X20Cfg"
]
}
lpm init
in a new folder, and then adding the content that you want). Then you need to edit the package.json
to include the following field:
"lpm": {
"type": "program" | "library" | "project"
}
LPM reads this field when it installs a published package, and based on the package type it decides what it should do. For example: if the package type is "library", then LPM decides to place the contents in the "Libraries" folder in the Logical View.
To add a few more details,
Project and HMI Packages are meant to be "Templates" in that they are starts to new projects of that type. These may replace items.
For example, if you do an
lpm install starterasproject
the package.json should not include startasproject as a depencency, and instead the enture file gets replaced with the package.json that is in the package.
The folder packages are Automation studio folder packages and contain information about where to put the package in the logical view and how to deploy the individual objects.
Thank you for the quick response.
Hi Loupe team,
We have looked through the LPM code and tried it out and we have several questions that we couldn't find in the documentation and is not clear in the code as well: