middleman 0.3.9 → 0.3.10
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/VERSION +1 -1
- data/bin/mm-build +3 -1
- data/lib/middleman.rb +7 -2
- data/middleman.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.10
|
data/bin/mm-build
CHANGED
@@ -20,7 +20,9 @@ module Generators
|
|
20
20
|
# Override template to ask staticmatic for the correct extension to output
|
21
21
|
def self.template(name, *args, &block)
|
22
22
|
return if args.first.include?('layout')
|
23
|
-
|
23
|
+
args.first.split('/').each do |part|
|
24
|
+
return if part[0,1] == '_'
|
25
|
+
end
|
24
26
|
|
25
27
|
if (args[0] === args[1])
|
26
28
|
newext = case File.extname(args.first)
|
data/lib/middleman.rb
CHANGED
@@ -49,8 +49,11 @@ class Middleman < Sinatra::Base
|
|
49
49
|
config.project_path = Dir.pwd
|
50
50
|
config.sass_dir = File.join(File.basename(self.views), "stylesheets")
|
51
51
|
config.output_style = :nested
|
52
|
+
config.css_dir = File.join(File.basename(self.public), "stylesheets")
|
52
53
|
config.images_dir = File.join(File.basename(self.public), "images")
|
53
|
-
config.
|
54
|
+
config.http_path = "/"
|
55
|
+
config.http_images_path = "/images"
|
56
|
+
config.http_stylesheets_path = "/stylesheets"
|
54
57
|
config.add_import_path(config.sass_dir)
|
55
58
|
end
|
56
59
|
end
|
@@ -73,7 +76,9 @@ class Middleman < Sinatra::Base
|
|
73
76
|
get %r{/(.*).css} do |path|
|
74
77
|
content_type 'text/css', :charset => 'utf-8'
|
75
78
|
begin
|
76
|
-
|
79
|
+
location_of_sass_file = defined?(MIDDLEMAN_BUILDER) ? "build" : "views"
|
80
|
+
css_filename = File.join(Dir.pwd, location_of_sass_file) + request.path_info
|
81
|
+
sass(path.to_sym, Compass.sass_engine_options.merge({ :css_filename => css_filename }))
|
77
82
|
rescue Exception => e
|
78
83
|
sass_exception_string(e)
|
79
84
|
end
|
data/middleman.gemspec
CHANGED