Skip to content

tool-spec/tool_template_typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tool_template_typescript

This is the template for a generic containerized TypeScript tool following the Tool Specification for reusable research software using Docker.

Use this template when you want TypeScript with typed parameter bindings. For plain JavaScript, use tool_template_node instead.

How it works

  • gotap generates parameters.ts with typed interfaces from tool.yml at Docker build time
  • tsx runs TypeScript directly without a compile step
  • Parameters and data paths are validated via gotap parse before your tool runs

File structure

/
|- in/
|  |- input.json
|- out/
|- src/
|  |- tool.yml
|  |- run.ts
|  |- parameters.ts   (generated by gotap at build time)

Build and run

docker build -t tool_typescript .
docker run --rm -v $(pwd)/in:/in -v $(pwd)/out:/out -e TOOL_RUN=foobar tool_typescript

Customize

  1. Edit tool.yml to describe your tool and parameters
  2. Add dependencies in the Dockerfile (npm install ...)
  3. Implement your logic in run.ts
  4. Build and run

About

Node tool template with TypeScript support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •