scratch/Rules

43 lines
626 B
Text
Raw Normal View History

2009-10-09 12:27:31 +00:00
#!/usr/bin/env ruby
2010-01-01 21:07:55 +00:00
# engendrement des fichiers html
2009-10-12 15:36:17 +00:00
# page d'Accueil
2010-01-19 15:23:37 +00:00
#route '/' do
# '/index.html'
#end
2009-10-12 15:36:17 +00:00
2010-01-19 15:23:37 +00:00
# CSS
compile '/css/*' do
filter :sass
2009-10-09 12:27:31 +00:00
end
2010-01-19 15:23:37 +00:00
route '/css/*' do
2010-01-20 15:20:44 +00:00
'/Scratch/assets' + item.identifier.chop + '.css'
2009-10-09 12:27:31 +00:00
end
2010-01-20 15:20:44 +00:00
compile '/css/raw/*' do
end
route '/css/raw/*' do
'/Scratch' + item.identifier.sub(/raw\//,'').chop + '.css'
end
# JS
compile '/js/*' do
end
route '/js/*' do
'/Scratch/assets' + item.identifier.chop + '.js'
end
2010-01-19 15:23:37 +00:00
# HTML
compile '/html/*' do
2009-10-09 12:27:31 +00:00
filter :erb
layout 'default'
end
2010-01-19 15:23:37 +00:00
route '/html/*' do
'/Scratch' + item.identifier.sub('/html','') + 'index.html'
2009-10-09 12:27:31 +00:00
end
layout '*', :erb
2010-01-01 21:07:55 +00:00