Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 26 lines (21 sloc) 0.683 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
require 'rake/clean'
require 'haml'
require 'sass'

HAML = FileList.new('**/*.haml').ext('html')
SCSS = FileList.new('**/*.scss').ext('css')
CLOBBER.include HAML + SCSS

rule '.html' => '.haml' do |t|
  puts "Generating #{t.name}"
  File.open(t.name, 'w') { |f| f << Haml::Engine.new(open(t.source).read).render }
end

rule '.css' => '.scss' do |t|
  puts "Generating #{t.name}"
  File.open(t.name, 'w') { |f| f << Sass::Engine.new(open(t.source).read, :syntax => :scss, :style => :compressed).render }
end

desc 'Generate html and css from sources'
task :default => HAML + SCSS do
end

desc 'Build and start server'
task :server => :default do
  sh %{ jekyll --server --safe }
end
Something went wrong with that request. Please try again.