update rules n stuff

This commit is contained in:
Lorin Werthen 2017-03-15 18:32:36 +01:00
parent 6801b5a098
commit 7ee16adeb3
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
3 changed files with 11 additions and 22 deletions

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'nanoc', '4.5.4' gem 'nanoc', '4.7'
# General filtering # General filtering
gem 'coffee-script' gem 'coffee-script'

View file

@ -12,14 +12,14 @@ GEM
execjs execjs
coffee-script-source (1.10.0) coffee-script-source (1.10.0)
colored (1.2) colored (1.2)
concurrent-ruby (1.0.4) concurrent-ruby (1.0.5)
cri (2.7.1) cri (2.7.1)
colored (~> 1.2) colored (~> 1.2)
css_press (0.3.2) css_press (0.3.2)
csspool-st (= 3.1.2) csspool-st (= 3.1.2)
json json
csspool-st (3.1.2) csspool-st (3.1.2)
ddplugin (1.0.0) ddplugin (1.0.1)
execjs (2.7.0) execjs (2.7.0)
ffi (1.9.14) ffi (1.9.14)
formatador (0.2.5) formatador (0.2.5)
@ -60,7 +60,7 @@ GEM
css_press css_press
multi_js (0.1.0) multi_js (0.1.0)
uglifier (~> 2) uglifier (~> 2)
nanoc (4.5.4) nanoc (4.7.0)
cri (~> 2.3) cri (~> 2.3)
ddplugin (~> 1.0) ddplugin (~> 1.0)
hamster (~> 3.0) hamster (~> 3.0)
@ -110,7 +110,7 @@ DEPENDENCIES
html_press html_press
icalendar icalendar
kramdown kramdown
nanoc (= 4.5.4) nanoc (= 4.7)
sass sass
terminal-notifier-guard terminal-notifier-guard
therubyracer therubyracer

23
Rules
View file

@ -27,7 +27,6 @@ end
# #
compile '/feed.xml' do compile '/feed.xml' do
filter :erb filter :erb
write '/feed.xml'
end end
# #
@ -58,6 +57,7 @@ end
compile '/events/**/*', rep: :ical do compile '/events/**/*', rep: :ical do
filter :ical filter :ical
write ext: 'ics'
end end
# #
@ -110,6 +110,7 @@ end
# #
compile '/assets/scripts/**/*.coffee' do compile '/assets/scripts/**/*.coffee' do
filter :coffeescript filter :coffeescript
write ext: 'js'
end end
ignore '/assets/stylesheets/includes/**/*' ignore '/assets/stylesheets/includes/**/*'
@ -117,6 +118,7 @@ ignore '/assets/stylesheets/includes/**/*'
compile '/assets/stylesheets/**/*.scss' do compile '/assets/stylesheets/**/*.scss' do
filter :sass, syntax: :scss filter :sass, syntax: :scss
filter :autoprefixer if production? filter :autoprefixer if production?
write ext: 'css'
end end
# #
@ -128,25 +130,12 @@ end
# #
# ASSETS # ASSETS
# #
route '/assets/stylesheets/**/*' do
"#{item.identifier.without_ext}.css"
end
route '/assets/scripts/**/*' do
"#{item.identifier.without_ext}.js"
end
# EVENTS # EVENTS
route '/events/**/*', rep: :ical do route '/**/index.{erb,html,md}' do
"#{item.identifier.without_ext}.ics"
end
route '/**/*.{erb,html,md}' do
if item.identifier.without_ext.to_s =~ %r{/index$}
"#{item.identifier.without_ext}.html" "#{item.identifier.without_ext}.html"
else
"#{item.identifier.without_ext}/index.html"
end end
route '/**/*.{erb,html,md}' do
"#{item.identifier.without_ext}/index.html"
end end
# Let anything else simply pass through # Let anything else simply pass through