INNER CODE UNIT · TypeScript

cleanLogs

Serverless-Devs/Serverless-Devs · src/command/clean/index.ts:22

function cleanLogs() {
  const sPath = getRootHome();
  const p = path.join(sPath, 'logs');
  rimraf.sync(p);
  logger.info('Logs cleaned up successfully.');
}

function cleanCache(cache: string | boolean) {
  const sPath = getRootHome();
  const cachePath = path.join(sPath, 'cache');

  // cache 无参数
  if (cache === true) {
    rimraf.sync(cachePath);
    logger.info('Cache cleaned up successfully.');
    return;
  }
  // cache 有参数

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…