Setting Up Your Environment
The first step is to setup a node project to build your templates in. Be sure to have both Node and NPM installed before following these steps! We highly recommend using nvm.Bash
@metlo/testing
for the testing utility
functions.
Bash
Creating a New Template
Although you can structure your templates however you want, since templates can have different versions we recommend structuring your template repository like this (with folders for templates and typescript files for each version):VERIFY_CSP_HEADERS
.
v1.ts
in the editor of your choice and paste the following:
TypeScript
Generating a Test
You can generate a test with this new template using the Metlo CLI.Bash
Running Your Generated Test
First fill in any values you need inoutput.yaml
. After that, you can run the
generated test by running the following:
Bash
Pushing Your Templates to Metlo
After you’ve verified that the template works, you can push your template to Metlo by running:Bash