blazingly fast sass compilation
This commit is contained in:
parent
04461208e9
commit
dffa91056f
5 changed files with 25 additions and 14 deletions
2
Gemfile
2
Gemfile
|
@ -10,7 +10,7 @@ gem 'coffee-script'
|
|||
gem 'icalendar' # ical files
|
||||
gem 'kramdown'
|
||||
gem 'rainpress'
|
||||
gem 'sass'
|
||||
gem 'sassc'
|
||||
gem 'typogruby'
|
||||
|
||||
# Needed for atom_feed in blogging helper
|
||||
|
|
11
Gemfile.lock
11
Gemfile.lock
|
@ -81,17 +81,16 @@ GEM
|
|||
public_suffix (3.0.3)
|
||||
rack (2.0.5)
|
||||
rainpress (1.0.1)
|
||||
rake (12.3.1)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
ref (2.0.0)
|
||||
ruby_dep (1.5.0)
|
||||
rubypants (0.7.0)
|
||||
sass (3.5.6)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sassc (2.0.0)
|
||||
ffi (~> 1.9.6)
|
||||
rake
|
||||
shellany (0.0.1)
|
||||
slow_enumerator_tools (1.1.0)
|
||||
terminal-notifier (2.0.0)
|
||||
|
@ -127,7 +126,7 @@ DEPENDENCIES
|
|||
nanoc
|
||||
pandoc-ruby
|
||||
rainpress
|
||||
sass
|
||||
sassc
|
||||
terminal-notifier
|
||||
terminal-notifier-guard
|
||||
therubyracer
|
||||
|
|
16
Rules
16
Rules
|
@ -164,12 +164,12 @@ end
|
|||
#
|
||||
compile '/assets/scripts/**/*.coffee' do
|
||||
filter :coffeescript
|
||||
filter :uglify_js
|
||||
filter :uglify_js if production?
|
||||
write ext: 'js'
|
||||
end
|
||||
|
||||
compile '/assets/scripts/**/*.js' do
|
||||
filter :uglify_js, harmony: true
|
||||
filter :uglify_js, harmony: true if production?
|
||||
end
|
||||
|
||||
ignore '/assets/stylesheets/includes/**/*'
|
||||
|
@ -177,14 +177,22 @@ ignore '/data/**/*'
|
|||
ignore '/node_modules/**/*'
|
||||
|
||||
compile '/assets/stylesheets/**/*.scss' do
|
||||
filter :sass, syntax: :scss, style: :compressed
|
||||
sass_opts = {
|
||||
syntax: :scss,
|
||||
load_paths: ['content/assets/stylesheets']
|
||||
}
|
||||
sass_opts[:style] = :compressed if production?
|
||||
filter :sassc, sass_opts
|
||||
|
||||
filter :autoprefixer if production?
|
||||
write ext: 'css'
|
||||
end
|
||||
|
||||
compile '/assets/stylesheets/**/*.css' do
|
||||
if production?
|
||||
filter :rainpress
|
||||
filter :autoprefixer if production?
|
||||
filter :autoprefixer
|
||||
end
|
||||
write ext: 'css'
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@import "includes/variables";
|
||||
|
||||
@import "../../../node_modules/bulma/bulma";
|
||||
@import "../../../node_modules/bulma-divider/divider";
|
||||
@import "node_modules/bulma/bulma";
|
||||
@import "node_modules/bulma-divider/divider";
|
||||
|
||||
.nav-right {
|
||||
flex: none;
|
||||
|
|
4
lib/filters/sassc.rb
Normal file
4
lib/filters/sassc.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
require 'sassc'
|
||||
Nanoc::Filter.define(:sassc) do |content, params|
|
||||
SassC::Engine.new(content, params).render
|
||||
end
|
Loading…
Reference in a new issue