docs complete. closes #187 on a mother fucking cop.

This commit is contained in:
Thomas Reynolds 2012-01-14 12:52:19 -08:00
parent 5cc204e848
commit be6f6944ca
7 changed files with 22 additions and 9 deletions

View file

@ -1,11 +1,11 @@
middleman-*/lib/**/*.rb middleman-*/lib/**/*.rb
--exclude middleman-core/lib/middleman/vendor/ --exclude middleman-core/lib/middleman-core/vendor/
--exclude middleman-core/lib/middleman/extensions/automatic_image_sizes/fastimage.rb --exclude middleman-core/lib/middleman-core/extensions/automatic_image_sizes/fastimage.rb
--exclude middleman-more/lib/middleman/extensions/minify_css/cssmin.rb --exclude middleman-more/lib/middleman-more/extensions/minify_css/cssmin.rb
--exclude middleman-core/lib/middleman/step_definitions --exclude middleman-core/lib/middleman-core/step_definitions
--exclude middleman-core/lib/middleman/templates/default/ --exclude middleman-core/lib/middleman-core/templates/default/
--exclude middleman-core/lib/middleman/templates/html5/ --exclude middleman-core/lib/middleman-core/templates/html5/
--exclude middleman-core/lib/middleman/templates/mobile/ --exclude middleman-core/lib/middleman-core/templates/mobile/
--exclude middleman-core/lib/middleman/templates/shared/ --exclude middleman-core/lib/middleman-core/templates/shared/
--no-private --no-private
--hide-void-return --hide-void-return

View file

@ -16,6 +16,7 @@ module Middleman
autoload :Slim, "middleman-more/renderers/slim" autoload :Slim, "middleman-more/renderers/slim"
end end
# Core (automatic) extensions
module CoreExtensions module CoreExtensions
# Compass framework for Sass # Compass framework for Sass
autoload :Compass, "middleman-more/core_extensions/compass" autoload :Compass, "middleman-more/core_extensions/compass"
@ -23,7 +24,8 @@ module Middleman
# Sprockets 2 # Sprockets 2
autoload :Sprockets, "middleman-more/core_extensions/sprockets" autoload :Sprockets, "middleman-more/core_extensions/sprockets"
end end
# User-activatable extendions
module Extensions module Extensions
# RelativeAssets allow any asset path in dynamic templates to be either # RelativeAssets allow any asset path in dynamic templates to be either
# relative to the root of the project or use an absolute URL. # relative to the root of the project or use an absolute URL.
@ -40,6 +42,7 @@ module Middleman
autoload :MinifyJavascript, "middleman-more/extensions/minify_javascript" autoload :MinifyJavascript, "middleman-more/extensions/minify_javascript"
end end
# Setup renderers
require "coffee_script" require "coffee_script"
Base.register Middleman::Renderers::Haml Base.register Middleman::Renderers::Haml
Base.register Middleman::Renderers::Sass Base.register Middleman::Renderers::Sass

View file

@ -26,7 +26,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#++ #++
# Minify CSS
module CSSMin module CSSMin
# Compress a CSS string
# @param [String] input
# @return [String]
def self.compress(input) def self.compress(input)
css = input.is_a?(IO) ? input.read : input.dup.to_s css = input.is_a?(IO) ? input.read : input.dup.to_s
css.gsub!(/\/\*[\s\S]*?\*\//, '') css.gsub!(/\/\*[\s\S]*?\*\//, '')

View file

@ -25,6 +25,7 @@ module Middleman::Renderers::Liquid
rescue LoadError rescue LoadError
end end
end end
alias :included :registered alias :included :registered
end end
end end

View file

@ -36,6 +36,7 @@ module Middleman::Renderers::Markdown
end end
end end
end end
alias :included :registered alias :included :registered
end end
end end

View file

@ -14,6 +14,7 @@ module Middleman::Renderers::Sass
# Default sass options # Default sass options
app.set :sass, {} app.set :sass, {}
end end
alias :included :registered alias :included :registered
end end
@ -59,6 +60,7 @@ module Middleman::Renderers::Sass
# SCSS version of the above template # SCSS version of the above template
class ScssPlusCSSFilenameTemplate < SassPlusCSSFilenameTemplate class ScssPlusCSSFilenameTemplate < SassPlusCSSFilenameTemplate
# Define the expected syntax for the template # Define the expected syntax for the template
# @return [Symbol] # @return [Symbol]
def syntax def syntax

View file

@ -17,6 +17,7 @@ module Middleman::Renderers::Slim
rescue LoadError rescue LoadError
end end
end end
alias :included :registered alias :included :registered
end end
end end