import { SectionKind } from "./section-kind-31022e44"; import { ScaffoldConfig } from "./scaffold-config-89bf34d2"; import { Package } from "./package-16ec709b"; import { FindLicenseOptions } from "./find-license-options-16ec709b"; import { BadgeKind } from "./badge-kind-89bf34d2"; import { LicenseName } from "./license-name-2ed222d8"; import { FindPackageOptions } from "./find-package-options-ab72184f"; import { FileSystem } from "./file-system-a8065790"; import { GenerateReadmeOptions } from "./generate-readme-options-8bcd355e"; /** * Gets a Section mark. * * @param kind * @param startOrEnd */ declare function getShadowSectionMark(kind: SectionKind, startOrEnd: "start" | "end"): string; interface GetRelevantSectionsOptions { config: ScaffoldConfig; } /** * Gets all those sections that are relevant in relation to the given options * * @param options * @returns */ declare function getRelevantSections({ config }: GetRelevantSectionsOptions): Set; interface GetBadgesOptions extends FindLicenseOptions { pkg: Package; config: ScaffoldConfig; } type GetBadgesResult = { [Key in BadgeKind]?: string[]; }; /** * Gets relevant badges based on the given options * * @param options * @returns */ declare function getBadges(options: GetBadgesOptions): Promise; interface License { licenseName: LicenseName; badgeUrl: string; url: string; } /** * Gets the License for the given LicenseName * * @param licenseName * @returns */ declare function getLicenseForLicenseName(licenseName: LicenseName): License; /** * Takes the Github repository name from the given Package * * @param pkg * @returns */ declare function takeGithubRepositoryName(pkg: Package): string | undefined; interface FormatImageOptions { url: string; alt?: string; height?: number; width?: number; kind?: "markdown" | "html"; } /** * Generates a Markdown-formatted image based on the given options * * @param options * @returns */ declare function formatImage({ alt, url, height, width, kind }: FormatImageOptions): string; interface FormatUrlOptions { url: string; inner: string; } /** * Generates an Markdown-formatted URL based on the given options * * @param options * @returns */ declare function formatUrl({ inner, url }: FormatUrlOptions): string; interface FindCodeStylesOptions extends FindPackageOptions { pkg?: Package; fs?: Pick; } declare const enum CodeStyleKind { PRETTIER = "prettier", AIRBNB = "Airbnb", GOOGLE = "Google", IDIOMATIC = "Idiomatic.js", STANDARD = "Standard", XO = "XO" } interface CodeStyle { kind: CodeStyleKind; badgeUrl: string; url: string; } /** * Finds the code kind for the current project from the given root directory, if possible. * It will use various heuristics to attempt to do so. For example, if there is a prettier config * within the project, it is probably a Prettier project. * * @param options * @returns */ declare function findCodeStyles({ logger, root, fs, pkg }: FindCodeStylesOptions): Promise; /** * Gets the Code Style for the given CodeStyleKind * * @param kind * @returns */ declare function getCodeStyleForCodeStyleKind(kind: CodeStyleKind): CodeStyle; type BadgeColor = "green" | "brightgreen" | "yellowgreen" | "yellow" | "orange" | "red" | "lightblue" | "blue"; interface GenerateBadgeOptions { subject: string; status: string; color: BadgeColor; } /** * Generates an URL for a badge based on the given options * * @param options * @returns */ declare function generateBadgeUrl({ color, status, subject }: GenerateBadgeOptions): string; interface GenerateReadmeContext extends GenerateReadmeOptions { sections: Set; str: string; } /** * Generates the text for a README.md based on the given options * * @param options * @returns */ declare function generateReadme(options: GenerateReadmeOptions): Promise; export { getShadowSectionMark, getRelevantSections, getBadges, getLicenseForLicenseName, takeGithubRepositoryName, formatImage, formatUrl, findCodeStyles, getCodeStyleForCodeStyleKind, generateBadgeUrl, GenerateReadmeContext, generateReadme }; //# sourceMappingURL=generate-readme-c906d219.d.ts.map