Packages overview
Trading Cards publishes a set of shared npm packages under the @tradingcards-dev scope. These packages provide common functionality used across templates — things like encrypted config storage — so template authors don’t have to implement them from scratch.
Available packages
Section titled “Available packages”| Package | Description |
|---|---|
| @tradingcards-dev/config | Encrypted config get/save for HubSpot serverless functions |
Using packages in a template
Section titled “Using packages in a template”All packages are published publicly to npm. Add them to your template’s src/app/functions/package.json:
{ "dependencies": { "@tradingcards-dev/config": "^1.0.0" }}HubSpot installs dependencies automatically when the template is uploaded.
Source
Section titled “Source”Package source is maintained in the TC-Packages repository.