Templates

A Tangram Template is a template that contains both strings and artifacts. Templates are used to create strings like environment variables and scripts that refer to artifacts by their path.

Use tg as a tagged template function to create a template.

// Wrap a Node.js script and set an environment variable that refers to an artifact.
await std.wrap(tg`${nodejs}/bin/node ${mainJs}`, {
env: {
SSL_CERT_FILE: tg`${std.caCertificates()}/cacert.pem`,
},
});