Class: Jammit::CommandLine

Inherits:
Object
  • Object
show all
Defined in:
lib/jammit-core/command_line.rb

Overview

The @[email protected] is able to compress, pre-package, and pre-gzip all the assets specified in the configuration file, in order to avoid an initial round of slow requests after a fresh deployment.

Constant Summary collapse

"\nUsage: jammit OPTIONS\n\nRun jammit inside a Rails application to compresses all JS, CSS,\nand JST according to config/assets.yml, saving the packaged\nfiles and corresponding gzipped versions.\n\nIf you're using \"embed_assets\", and you wish to precompile the\nMHTML stylesheet variants, you must specify the \"base-url\".\n\nOptions:\n"

Instance Method Summary collapse

Constructor Details

#initializeCommandLine

The @Jammit::[email protected] runs from the contents of @[email protected]


26
27
28
29
30
31
32
# File 'lib/jammit-core/command_line.rb', line 26

def initialize
  parse_options
  ensure_configuration_file
  Jammit.load_configuration(@options[:config_path])
  Jammit.packager.force = @options[:force]
  Jammit.packager.precache_all(@options[:output_folder], @options[:base_url])
end