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.
- Language: TypeScript
- Runtime: Node.js (see engines in
package.json
) - Purpose: Task pipeline template and CLI skeleton
- Node.js (recommended version: 24.x —
package.json
specifiesnode: 24.9.0
) - npm (bundled with Node) or a compatible package manager
- Install dependencies:
npm install
- Prepare Husky (git hooks):
npx husky install
The project ships with a few npm scripts. You can run them with npm run <script>
.
npm run start
— run the project directly usingts-node
(development CLI entrypoint)npm run build
— compile TypeScript usingtsc
npm run test
— run Jest tests (looks fortest/**/*.test.ts
)npm run lint
— run ESLint onsrc
npm run lint:fix
— run ESLint with--fix
npm run prettier
— run Prettier and format files
Example:
npm run test
npm run lint
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.
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
).
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
).
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
- Fork the repo and create a branch for your change.
- Run tests and linters locally.
- 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.
Lino Rama — [email protected]
Project: https://github.com/ljramac/tasks-pipeline-template
ISC