module Primer::Static
def self.dump(stats)
def self.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 self.generate_arguments
a list of the arguments accepted by the component's constructor. Arguments are enumerated
Returns an array of hashes, one per Primer component, that contains some metadata and
def self.generate_arguments Static::GenerateArguments.call end
def self.generate_audited_at
Returns a hash mapping component names to the date on which the component passed
def self.generate_audited_at Static::GenerateAuditedAt.call end
def self.generate_constants
Returns a hash mapping component names to an array of the constants defined inside
def self.generate_constants Static::GenerateConstants.call end
def self.generate_info_arch
Returns an array of hashes, one per Primer component, that contains all the data needed
def self.generate_info_arch Static::GenerateInfoArch.call end
def self.generate_previews
an array of all the component's previews. The preview data contains the Lookbook URL
Returns an array of hashes, one per Primer component, that contains some metadata and
def self.generate_previews Static::GeneratePreviews.call end
def self.generate_statuses
Returns a hash mapping component names to component statuses (alpha, beta, etc),
def self.generate_statuses Static::GenerateStatuses.call end
def self.read(stats)
def self.read(stats) File.read(File.join(DEFAULT_STATIC_PATH, FILE_NAMES[stats])) end