task-definition-ts
v1.0.18
Published
A TypeScript-based ecs task definition generator.
Downloads
384
Readme
task-definition-ts
A TypeScript-based ecs task definition generator.
Installation
pnpm add -D task-definition-ts
Usage
- Create an
taskdefinition.ts
file.
import { defineTaskDefinition } from "task-definition-ts";
defineTaskDefinition(
{
// Your task definition goes here
},
// The default output directory is the same as where this file is located
// e.g. if file path is .github/task-defenition/express.ts, .github/task-defenition/express.json is generated.
"path/to/taskdefinition",
);
- Run the script to generate taskdefinition.json
npx tsx taskdefenition.ts
CI
If you want to completely remove the JSON file from the codebase, you can generate it on demand in the CI pipeline.
Unfortunately, the package manager doesn't seem to offer a feature to install just one package when a package.json file exists in the project.
So, if you want to use this package without installing all dependencies, you can use this script.
git clone https://github.com/shoma-mano/task-definition-ts ./node_modules/task-definition-ts
Contributing
This package generates AWS ECS Task Definitions using TypeScript. Please note that the types used in this project were auto-generated by giving docs info to AI, so there might be some inaccuracies or missing definitions.
If you find any issues or improvements, feel free to open a pull request (PR) to help us improve the package.