massimo 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/massimo/cli.rb CHANGED
@@ -5,9 +5,10 @@ module Massimo
5
5
  include Thor::Actions
6
6
 
7
7
  default_task :build
8
- class_option 'config', :desc => 'Path to the config file', :aliases => '-c'
9
- class_option 'source_path', :desc => 'Path to the source dir', :aliases => '-s'
10
- class_option 'output_path', :desc => 'Path to the output dir', :aliases => '-o'
8
+ class_option 'config', :desc => 'Path to the config file', :aliases => '-c'
9
+ class_option 'source_path', :desc => 'Path to the source dir', :aliases => '-s'
10
+ class_option 'output_path', :desc => 'Path to the output dir', :aliases => '-o'
11
+ class_option 'production', :desc => 'Sets the Site environment', :aliases => '-p', :type => :boolean
11
12
 
12
13
  desc 'build', 'Builds the site'
13
14
  def build
@@ -75,11 +76,12 @@ module Massimo
75
76
  def site
76
77
  @site ||= begin
77
78
  site = Massimo::Site.new config_file(:yml)
79
+ site.config.production = options[:production]
80
+ site.config.source_path = options[:source_path] if options[:source_path]
81
+ site.config.output_path = options[:output_path] if options[:output_path]
78
82
  if config_rb = config_file(:rb)
79
83
  site.instance_eval File.read(config_rb)
80
84
  end
81
- site.config.source_path = options[:source_path] if options[:source_path]
82
- site.config.output_path = options[:output_path] if options[:output_path]
83
85
  site
84
86
  end
85
87
  end
@@ -61,5 +61,11 @@ module Massimo
61
61
  def options_for(lib_name)
62
62
  send(lib_name) || {}
63
63
  end
64
+
65
+ # Wether or not the Site's environment is in production mode. Usually you would
66
+ # want to set this to compress and concat assets.
67
+ def production?
68
+ !!self.production
69
+ end
64
70
  end
65
71
  end
data/lib/massimo.rb CHANGED
@@ -12,7 +12,7 @@ module Massimo
12
12
  autoload :View, 'massimo/view'
13
13
  autoload :Watcher, 'massimo/watcher'
14
14
 
15
- VERSION = '0.6.1'
15
+ VERSION = '0.6.2'
16
16
 
17
17
  class << self
18
18
  def site
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 1
9
- version: 0.6.1
8
+ - 2
9
+ version: 0.6.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Pete Browne