Tasky is an overengineered TypeScript wrapper around your terminal.
First of all we need to install the CLI.
yarn add global @tasky/cli
# or NPM
npm install -g @tasky/cli
To run a task we need to create it. Here's an example showing how to git pull.
// task.ts
import Tasky from '@tasky/core'
import GitPlugin, { Git } from '@tasky/git'
Tasky.use("git", GitPlugin)
.task<Git>("git", async (git) => {
await git.pull()
}).run()
You can now execute this task via tasky task.ts
.
You can use the task
import along with the "custom"
identifier to execute your own commands.
import Tasky, { task } from '@tasky/core'
Tasky.task("custom", async () => {
await task("npm")
.addArgument("install")
.execute()
}).run()
If you have your own dependencies or require external dependencies inside your config you can create a tasky.json
file.
This file should be an object with all the dependencies you're going to use. This is an example file which would grab the standard packages.
{
"@tasky/core": "^1.0.0",
"@tasky/git": "^1.0.0",
"@tasky/npm": "^1.0.0"
}
Tasky automatically detects this file and will use these dependencies instead of the standard ones.
Good question, I didn't quite feel like using bash so I made this.
Overengineering is no laughing matter.