Package sharing within a tenant

#1

How easy (and documented) is package sharing of code developed in c3 within a tenant (e.g. metrics)?

0 Likes

#2

Very easy. You should group your code into packages by functionality, and a package can depend on any other package. For example, your package.json files might look like:

{
  "name": "myPackage",
  "description": "My Package.",
  "author": "Me",
  "dependencies": ["myOtherPackage", "myOtherOtherPackage"]
}
{
  "name": "myOtherPackage",
  "description": "My Other Package.",
  "author": "Me",
  "dependencies": []
}
{
  "name": "myOtherOtherPackage",
  "description": "My Other Other Package.",
  "author": "Me",
  "dependencies": []
}

See the “Deployment” and “package.json” documentation articles.

1 Like