Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export sveld for programmatic usage #66

Merged
merged 2 commits into from
Jan 22, 2022
Merged

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Jan 21, 2022

Closes #65

Future work:

  • allow the input to be passed as an option (currently, it will still use package.json#svelte
const { sveld } = require("sveld");
const pkg = require("./package.json");

sveld({
  glob: true,
  markdown: true,
  markdownOptions: {
    onAppend: (type, document, components) => {
      if (type === "h1")
        document.append("quote", `${components.size} components exported from ${pkg.name}@${pkg.version}.`);
    },
  },
  json: true,
  jsonOptions: {
    outFile: "docs/src/COMPONENT_API.json",
  },
});

@metonym metonym merged commit 6782da6 into main Jan 22, 2022
@metonym metonym deleted the programmatic-usage branch January 22, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support programmatic usage
1 participant