Sha256: e80031dec34452a44269e89fcac2ba8913791b67754c34708a09a10116052b1f
Contents?: true
Size: 839 Bytes
Versions: 75
Compression:
Stored size: 839 Bytes
Contents
require 'rails/generators' module Pageflow module Generators class ThemeGenerator < Rails::Generators::Base desc 'Creates a configurable theme based on the default theme.' argument :name, required: false, default: 'custom', desc: 'The name of the new theme' source_root File.expand_path('../templates', __FILE__) def copy_template directory('themes', File.join('app', 'assets', 'stylesheets', 'pageflow', 'themes')) empty_directory(File.join('app', 'assets', 'images', 'pageflow', 'themes', name)) copy_file('preview.png', "app/assets/images/pageflow/themes/#{name}/preview.png") copy_file('preview_thumbnail.png', "app/assets/images/pageflow/themes/#{name}/preview_thumbnail.png") end end end end
Version data entries
75 entries across 75 versions & 1 rubygems