0.3.3 • Published 5 years ago
@vadistic/tsask v0.3.3
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.jsonclean
Features
- runs task fns from
scripts/something.task.ts(file can have multiple tasks) - also grabs tasks from monorepo root
- can run any
.tsfile withts-node - task fns gets project paths as arg
- colorful logger
- it's already too much :)
Installation
yarn add -D @vadistic/tsaskExample
// 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