INNER CODE UNIT · TypeScript

doAction

Serverless-Devs/Serverless-Devs · src/command/component/index.ts:29

const doAction = async options => {
  const home = utils.getRootHome();
  const componentPath = path.join(home, 'components');
  const devsappPath = path.join(componentPath, 'devsapp.cn');
  if (!fs.existsSync(devsappPath)) {
    logger.tips('Component not found.', `You can visit ${chalk.cyan.underline('https://docs.serverless-devs.com/getting-started/')} to learn more.`);
    return;
  }
  const devsappDir = fs.readdirSync(devsappPath);
  const rows = [
    {
      Component: 'Component',
      Version: 'Version',
      Size: `Size`,
      Description: 'Description',
    },
  ];
  for (const dir of devsappDir) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…