Skip to content

ljramac/tasks-pipeline-template

Repository files navigation

Tasks Pipeline Template

A small, opinionated TypeScript template for building task pipelines and CLI tools. Includes linting, formatting, testing and a simple project structure to get started quickly.

Quick overview

  • Language: TypeScript
  • Runtime: Node.js (see engines in package.json)
  • Purpose: Task pipeline template and CLI skeleton

Prerequisites

  • Node.js (recommended version: 24.x — package.json specifies node: 24.9.0)
  • npm (bundled with Node) or a compatible package manager

Setup

  1. Install dependencies:
npm install
  1. Prepare Husky (git hooks):
npx husky install

Scripts

The project ships with a few npm scripts. You can run them with npm run <script>.

  • npm run start — run the project directly using ts-node (development CLI entrypoint)
  • npm run build — compile TypeScript using tsc
  • npm run test — run Jest tests (looks for test/**/*.test.ts)
  • npm run lint — run ESLint on src
  • npm run lint:fix — run ESLint with --fix
  • npm run prettier — run Prettier and format files

Example:

npm run test
npm run lint

Project structure

Top-level layout (important files/folders):

README.md
package.json
tsconfig.json
src/
	index.ts                 # CLI entrypoint
	application/             # use-cases and services
	domain/                  # domain entities and abstractions
	infrastructure/          # concrete implementations (services, tasks)
test/                      # unit & integration tests

Look at src/index.ts for the CLI bootstrap and src/application/use-cases/execute-workflow.ts for an example flow.

Usage

Run the CLI (development):

npm run start

If you compiled the project with npm run build, run the generated JS via node against dist (if you configure outDir in tsconfig.json).

Testing

Run the test suite with Jest:

npm run test

There are example unit tests under test/unit (for instance test/unit/domain/entities/video.file.test.ts).

Linting & formatting

This repo uses ESLint and Prettier. Husky + lint-staged are configured to run linters and Prettier on staged files before commit.

Fix lint issues and format files automatically:

npm run lint:fix
npm run prettier

Contributing

  1. Fork the repo and create a branch for your change.
  2. Run tests and linters locally.
  3. Open a pull request with a clear description of the change.

Husky is configured to run lint-staged pre-commit hooks; ensure linting and tests pass before pushing.

Author

Lino Rama — [email protected]

Project: https://github.com/ljramac/tasks-pipeline-template

License

ISC

About

Template for creating pipelines based on orchestrated tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published