class Prow::AppBuilder::Create
Public Instance Methods
app_path()
click to toggle source
# File lib/prow/app_builder/create.rb, line 47 def app_path path || `pwd`.chomp end
copy(file_path)
click to toggle source
# File lib/prow/app_builder/create.rb, line 39 def copy(file_path) FileUtils.cp(templates_path + "/" + file_path, app_path + "/" + file_path) end
copy_pages_and_layouts()
click to toggle source
# File lib/prow/app_builder/create.rb, line 20 def copy_pages_and_layouts copy('templates/layouts/default.mustache') copy('templates/pages/index.mustache') end
copy_partials()
click to toggle source
# File lib/prow/app_builder/create.rb, line 25 def copy_partials ShipdStyle::CopyDirectory.new(app_path + "/templates/partials", "templates").perform end
create_and_move_stylesheets()
click to toggle source
# File lib/prow/app_builder/create.rb, line 29 def create_and_move_stylesheets copier = ShipdStyle::CopyStylesheets.new(app_path) copier.perform copier.remove_namespace end
mkdir(dir)
click to toggle source
# File lib/prow/app_builder/create.rb, line 35 def mkdir(dir) FileUtils.mkdir(app_path + "/" + dir) unless File.exist?(dir) end
perform()
click to toggle source
# File lib/prow/app_builder/create.rb, line 4 def perform copy('config.ru') copy('Guardfile') mkdir('public') mkdir('templates') mkdir('config') mkdir('templates/layouts') mkdir('templates/pages') mkdir('templates/partials') copy('config/pages.json') copy_partials mkdir('sass') create_and_move_stylesheets copy_pages_and_layouts end
templates_path()
click to toggle source
# File lib/prow/app_builder/create.rb, line 43 def templates_path File.dirname(__FILE__) + "/templates" end