module Ariadne::Static

def dump(stats)

Generates the requested stat hash and outputs it to a file.
def dump(stats)
  File.open(File.join(DEFAULT_STATIC_PATH, FILE_NAMES[stats]), "w") do |f|
    f.write(JSON.pretty_generate(send(:"generate_#{stats}")))
    f.write($INPUT_RECORD_SEPARATOR)
  end
end

def generate_arguments

with their value, data type, and docstring.
a list of the arguments accepted by the component's constructor. Arguments are enumerated
Returns an array of hashes, one per Ariadne component, that contains some metadata and
def generate_arguments
  Static::GenerateArguments.call
end

def generate_audited_at

an accessibility audit.
Returns a hash mapping component names to the date on which the component passed
def generate_audited_at
  Static::GenerateAuditedAt.call
end

def generate_constants

the component's class.
Returns a hash mapping component names to an array of the constants defined inside
def generate_constants
  Static::GenerateConstants.call
end

def generate_previews

to each preview and its name.
an array of all the component's previews. The preview data contains the Lookbook URL
Returns an array of hashes, one per Ariadne component, that contains some metadata and
def generate_previews
  Static::GeneratePreviews.call
end

def generate_structure

for the new primer.style docsite.
Returns an array of hashes, one per Ariadne component, that contains all the data needed
def generate_structure
  Static::GenerateStructure.call
end

def read(stats)

Returns the contents of the stat file.
def read(stats)
  File.read(File.join(DEFAULT_STATIC_PATH, FILE_NAMES[stats]))
end