版博士V2.0程序
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

20 righe
442 B

  1. #!/usr/bin/env node
  2. import fs from "fs";
  3. import * as path from "path";
  4. import * as url from "url";
  5. const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
  6. const exists = fs.existsSync("./README.md");
  7. if (exists) {
  8. // Restore version of README previously there.
  9. fs.copyFileSync(
  10. path.join(__dirname, "./README.md"),
  11. path.join(__dirname, "../README.md")
  12. );
  13. fs.unlinkSync(path.join(__dirname, "./README.md"));
  14. }