Sha256: a19159eddd990ff61f4ff6c44a49625d5e5fb0cfee35680392a35921292e290f
Contents?: true
Size: 1.16 KB
Versions: 46
Compression:
Stored size: 1.16 KB
Contents
# encoding: utf-8 module ClassyAssets class CLI < Thor include Thor::Actions source_root File.expand_path('../../../bin/.files', __FILE__) desc "init", "Initializes ClassyAssets for your application" method_option :root, default: File.expand_path('../../../', __FILE__), desc: 'Path to the root of your application' def init puts "Initializing ClassyAssets for your application..." empty_directory(File.join(options[:root], 'assets')) empty_directory(File.join(options[:root], 'assets', 'images')) empty_directory(File.join(options[:root], 'assets', 'javascripts')) empty_directory(File.join(options[:root], 'assets', 'stylesheets')) puts "Done!" end desc "install_hook", "Installs the optional git pre-commit hook, which will automatically precompile changed assets when you commit changed assets" method_option :root, default: File.expand_path('../../../', __FILE__), desc: 'Path to the root of your application' def install_hook puts "Installing ClassyAssets git pre-commit hook..." copy_file 'pre-commit.hook', File.join(options[:root], '.git', 'hooks', 'pre-commit') end end end
Version data entries
46 entries across 46 versions & 1 rubygems