Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to dart sass #605

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ gem 'kramdown'
gem 'mime-types'
gem 'nokogiri'
gem 'rouge'
gem 'sass'
gem 'systemu'

group :test do
Expand All @@ -20,6 +19,7 @@ group :development do
end

group :nanoc do
gem 'nanoc-dart-sass'
gem 'nanoc-live'
end

Expand Down
14 changes: 8 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GEM
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.14.2)
google-protobuf (3.21.12)
http_parser.rb (0.8.0)
immutable-ruby (0.2.0)
concurrent-ruby (~> 1.1)
Expand Down Expand Up @@ -80,6 +81,9 @@ GEM
slow_enumerator_tools (~> 1.0)
tty-platform (~> 0.2)
zeitwerk (~> 2.1)
nanoc-dart-sass (1.0.3)
nanoc-core (~> 4.12)
sass-embedded (~> 1.56)
nanoc-deploying (1.0.2)
nanoc-checking (~> 1.0)
nanoc-cli (~> 4.11, >= 4.11.15)
Expand Down Expand Up @@ -120,11 +124,9 @@ GEM
strscan (>= 3.0.9)
rouge (4.2.1)
ruby-progressbar (1.13.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-embedded (1.58.0)
google-protobuf (~> 3.21)
rake (>= 10.0.0)
set (1.1.0)
slow_enumerator_tools (1.1.0)
sorted_set (1.0.3)
Expand Down Expand Up @@ -152,12 +154,12 @@ DEPENDENCIES
minitest
minitest-reporters
nanoc (~> 4.12)
nanoc-dart-sass
nanoc-live
nokogiri
puma (~> 6.4)
rake
rouge
sass
systemu

BUNDLED WITH
Expand Down
12 changes: 6 additions & 6 deletions Rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ postprocess do
create_search_index
end

compile '/assets/css/*/' do
if item.identifier =~ %r{/_[^/]+/$}
compile '/assets/css/**/*' do
if item.identifier.to_s =~ %r{/_\w+\.scss$}
# don't compile partials
else
filter :sass, :syntax => :scss, :style => :compressed
filter :dart_sass, :syntax => :scss, :style => :compressed
filter :relativize_paths, type: :css
end
end
Expand Down Expand Up @@ -57,15 +57,15 @@ compile '*' do
end


route '/assets/css/*/' do
if item.identifier =~ %r{/_[^/]+/$}
route '/assets/css/**/*' do
if item.identifier.to_s =~ %r{/_\w+\.scss$}
# don't route partials
else
item.identifier.chop + '.css'
end
end

route '/assets/*/' do
route '/assets/**/*' do
item.identifier.to_s.chop + '.' + item[:extension]
end

Expand Down
5 changes: 5 additions & 0 deletions content/assets/css/_application.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
//
// Application Template
// --------------------------------------------------
@mixin font-awesome($unicode) {
font-family: "Font Awesome 5 Free";
font-weight: 900;
content: $unicode;
}

.table {
width: 100%;
Expand Down
9 changes: 0 additions & 9 deletions content/assets/css/_mixins.scss

This file was deleted.

4 changes: 2 additions & 2 deletions content/assets/css/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ h3 {
margin: 0;
padding: 12px 0 8px 0;
i {
margin-right: $base-unit/4;
margin-right: calc($base-unit / 4);
}
}

Expand All @@ -50,7 +50,7 @@ h5 {
}

p, pre, table {
margin: 0 0 $base-unit/1.5 0;
margin: 0 0 calc($base-unit / 1.5) 0;
}

a {
Expand Down
1 change: 0 additions & 1 deletion content/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@import "../../dist/highlightjs/styles/github.css";
@import "variables";
@import "colorscheme";
@import "mixins";
@import "typography";
@import "syntax";
@import "template";
Expand Down
Loading