packages/bundler/src/tools/sassdoc.js
async function createMarkdown(sourceDir, config) {
  config = config || {};

  return sassdoc.parse(sourceDir, config).then(
    data => {
      let markdownFile = '';

      const documentedItems = data.filter(
        (item, index) => item.access === 'public' || item.access === 'private'
      );

      markdownFile += `# Sass API

| Mark | Description |
| --- | --- |
| ✅ | Public functions, mixins, placeholders, and variables |
| ❌ | Private items - not supported outside package's build |
| ⚠️ | Deprecated items - may not be available in future releases |

<!-- toc -->
<!-- tocstop -->`;

      let currentGroup = '';

      documentedItems.forEach(item => {
        const itemGroup = createGroupName(item.group);

        if (itemGroup !== currentGroup) {
          markdownFile += `\n\n## ${itemGroup}`;
          currentGroup = itemGroup;
        }

        markdownFile += createMarkdownItem(item);
      });

      return prettier.format(
        toc.insert(markdownFile, { slugify }),
        prettierOptions
      );
    },
    err => {
      console.error(err);
    }
  );
}
async function createMarkdown(sourceDir, config) {
  config = config || {};

  return sassdoc.parse(sourceDir, config).then(
    data => {
      let markdownFile = '';

      const documentedItems = data.filter(
        (item, index) => item.access === 'public' || item.access === 'private'
      );

      markdownFile += `# Sass API

| Mark | Description |
| --- | --- |
| ✅ | Public functions, mixins, placeholders, and variables |
| ❌ | Private items - not supported outside package's build |
| ⚠️ | Deprecated items - may not be available in future releases |

<!-- toc -->
<!-- tocstop -->`;

      let currentGroup = '';

      documentedItems.forEach(item => {
        const itemGroup = createGroupName(item.group);

        if (itemGroup !== currentGroup) {
          markdownFile += `\n\n## ${itemGroup}`;
          currentGroup = itemGroup;
        }

        markdownFile += createMarkdownItem(item);
      });

      return prettier.format(
        toc.insert(markdownFile, { slugify }),
        prettierOptions
      );
    },
    err => {
      console.error(err);
    }
  );
}
Create a markdown file of documented Sass items
@see {@link http://sassdoc.com/configuration/|Sassdoc configuration}
@param {string} sourceDir - source directory
@param {Object} config - configuration object
@return {string} markdown