put jurisdiction in npm package.json

This commit is contained in:
Grahame Grieve 2024-05-19 09:36:20 -05:00
parent 5662ec131f
commit 21e7e70a99
1 changed files with 4 additions and 0 deletions

View File

@ -249,6 +249,10 @@ public class NPMPackageGenerator {
npm.add("directories", dir);
dir.add("lib", "package");
dir.add("example", "example");
if (ig.hasJurisdiction() && ig.getJurisdiction().size() == 1 && ig.getJurisdictionFirstRep().getCoding().size() == 1) {
Coding c = ig.getJurisdictionFirstRep().getCodingFirstRep();
npm.add("jurisdiction", c.getSystem()+"#"+c.getCode());
}
String json = JsonParser.compose(npm, true);
try {
addFile(Category.RESOURCE, "package.json", json.getBytes("UTF-8"));