doc.mts 488 B

12345678910111213141516
  1. #!/usr/bin/env zx
  2. import 'zx/globals';
  3. import {
  4. cliArguments,
  5. getToolchainArgument,
  6. workingDirectory,
  7. } from './setup/shared.mts';
  8. const [folder, ...args] = cliArguments();
  9. const docArgs = ['--all-features', '--no-deps', ...args];
  10. const toolchain = getToolchainArgument('lint');
  11. const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
  12. $.env['RUSTDOCFLAGS'] = '--cfg docsrs -D warnings';
  13. await $`cargo ${toolchain} doc --manifest-path ${manifestPath} ${docArgs}`;