format.mjs 318 B

1234567891011
  1. #!/usr/bin/env zx
  2. import 'zx/globals';
  3. import { workingDirectory, getProgramFolders } from '../utils.mjs';
  4. // Format the programs.
  5. await Promise.all(
  6. getProgramFolders().map(async (folder) => {
  7. await $`cd ${path.join(workingDirectory, folder)}`.quiet();
  8. await $`cargo fmt ${process.argv.slice(3)}`;
  9. })
  10. );