@vadistic/tsask
v0.3.3
Published
tsask = 'typescript task'
Downloads
5,387
Readme
tsask
tsask = Typescript Task
Inspired by ./task.js
.
Why
- yeah, it's just
ts-node --transpileOnly
- refactored from other project, because I thought it's quite cool (even though really simple)
- no buy-in, scripts will be just them scripts
- helps to keep
scripts/*
/package.json
clean
Features
- runs task fns from
scripts/something.task.ts
(file can have multiple tasks) - also grabs tasks from monorepo root
- can run any
.ts
file withts-node
- task fns gets project paths as arg
- colorful logger
- it's already too much :)
Installation
yarn add -D @vadistic/tsask
Example
// scripts/hello.task.ts
export const whatever = () => {
console.log('Hello!')
}
// or with build-in logger
export const whatever = (args, { logger }) => {
logger.log('Hello!')
}
tsask hello
tsask any/ts/file/can/be/run/from/project/root.ts