DEV Community

loading...

Discussion on: A simple way to replace npm scripts in Deno

Collapse
brianboyko profile image
Brian Boyko

Hey, I turned Taskfile.js into Taskfile.ts and added some typing info. Let me know what you think.
gist.github.com/brianboyko/735c9d9...

Collapse
vonheikemen profile image
Heiker Author

It's awesome. May I suggest a "task" to list the other available tasks in the object. I do something like this:

run(Deno.args, {
  start(...args) {
    exec(["deno", "run", entrypoint, ...args]);
  },
  // others tasks....
  list() {
    Object.keys(this).forEach((k) => console.log(k));
  },
});
Enter fullscreen mode Exit fullscreen mode