Skip to content

shoma-mano/task-definition-ts

Repository files navigation

task-definition-ts

A TypeScript-based ecs task definition generator.

alt text

Installation

pnpm add -D task-definition-ts

Usage

  1. 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.json",
);
  1. 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 to help us improve the package.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published