Wayfinder.FileWriter (Wayfinder v0.1.0)

View Source

This module is responsible for writing generated Typescript code to the destination folder

Summary

Types

paths()

@type paths() :: %{controller_path: String.t(), imports_line: String.t()}

Functions

build_paths(controller, opts)

@spec build_paths(Wayfinder.Processor.controller(), Wayfinder.Options.t()) :: paths()

prepare(opts)

@spec prepare(Wayfinder.Options.t()) :: :ok | {:error, Wayfinder.Error.t()}

write(controller_path, code)

@spec write(String.t(), String.t()) :: :ok | {:error, term()}