class Zapnito::Cli::Services::Local
Public Instance Methods
create_theme!(tenant_slug)
click to toggle source
# File lib/zapnito/cli/services/local.rb, line 15 def create_theme!(tenant_slug) path = File.join(configatron.working_dir, tenant_slug) FileUtils.mkdir(path) FileUtils.mkdir("#{path}/assets") FileUtils.touch("#{path}/assets/.gitkeep") File.open("#{path}/tenant.scss", "w+") do |f| f.write("@import \"base/main\";") end puts "---! Created #{tenant_slug}" end
load(path = configatron.working_dir)
click to toggle source
# File lib/zapnito/cli/services/local.rb, line 5 def load(path = configatron.working_dir) Models::Theme.new(path) end
tenant_slugs()
click to toggle source
# File lib/zapnito/cli/services/local.rb, line 9 def tenant_slugs Dir.chdir(configatron.working_dir) do Dir["*"] end end