Back to Moon

Scripts

website/docs/__partials__/migrate/deno/scripts.mdx

2.2.4793 B
Original Source

Deno provides a built-in task runner through the deno task command. While Deno tasks are great, they're not as efficient as moon. They do not support granular inputs, smart hashing, incremental caching, and all the other performance benefits that moon provides.

With that being said, you do not have to migrate away from Deno tasks. Instead, you can simply run them from within moon tasks. This gives you the best of both worlds.

yaml
language: 'typescript'

tasks:
  analyze:
    command: 'deno task analyze'
    inputs:
      - '@globs(sources)'
      - '@globs(tests)'
      - 'Rakefile'

When Deno tasks are ran through moon tasks, the current working directory is set to the project root.