massimo 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/massimo/cli.rb +7 -5
- data/lib/massimo/config.rb +6 -0
- data/lib/massimo.rb +1 -1
- metadata +2 -2
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',
|
|
9
|
-
class_option 'source_path', :desc => 'Path to the source dir',
|
|
10
|
-
class_option 'output_path', :desc => 'Path to the output dir',
|
|
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
|
data/lib/massimo/config.rb
CHANGED
|
@@ -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