Skip to content

Latest commit

 

History

History
executable file
·
21 lines (15 loc) · 379 Bytes

index.md

File metadata and controls

executable file
·
21 lines (15 loc) · 379 Bytes

Markdown Scripts

It's possible to write scripts using markdown. Only code blocks will be executed by zx. Try to run zx examples/index.md.

await $`whoami`
await $`ls -la ${__dirname}`

The __filename will be pointed to index.md:

console.log(chalk.yellowBright(__filename))

We can use imports here as well:

await import('./basics.mjs')