Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "svg2elm"

Index

Functions

generateModule

  • generateModule(moduleName: string, filePaths: string[]): Promise<string>
  • Generates an Elm Module with a function per SVG file.

    Parameters

    • moduleName: string

      The name of the Elm module to generate.

    • filePaths: string[]

      An array of file paths to SVG files

    Returns Promise<string>

generateModuleHeader

  • generateModuleHeader(moduleName: string): string
  • Given a module name, generates the module declaration and required imports.

    Parameters

    • moduleName: string

      The name of the Elm module to generate.

    Returns string

generateSvgFunction

  • generateSvgFunction(name: string, code: string): Promise<string>
  • Generates an Elm function from an SVG.

    Parameters

    • name: string

      The name of the Elm function to generate. This name will be camelCased.

    • code: string

      The source code of the SVG file

    Returns Promise<string>

Generated using TypeDoc