Skip to content

Commit

Permalink
Upgrade middleman-sprockets gem
Browse files Browse the repository at this point in the history
middleman now natifvely supports scss, so we only
need middleman-sprockets for coffeescript.
As of this upgrade, relying on middleman-sprockets for
CSS results in partials not being loaded--see
middleman/middleman-sprockets#127

So in this commit I also enable middleman-sprockets only for JS
so that CSS is processed directly by middleman.
  • Loading branch information
betesh committed Dec 2, 2020
1 parent 99a3635 commit 19719a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'mime-types'
# Middleman Gems
gem 'middleman', '>= 4.0.0'
gem 'middleman-livereload'
gem 'middleman-sprockets', '~> 4.0.0.rc.3'
gem 'middleman-sprockets', '~> 4.1.1'
gem 'middleman-s3_sync'

gem 'sprockets', '~> 4.0.2'
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ GEM
parallel
ruby-progressbar
unf
middleman-sprockets (4.0.0)
middleman-sprockets (4.1.1)
middleman-core (~> 4.0)
sprockets (>= 3.0)
mime-types (3.3.1)
Expand Down Expand Up @@ -159,7 +159,7 @@ DEPENDENCIES
middleman (>= 4.0.0)
middleman-livereload
middleman-s3_sync
middleman-sprockets (~> 4.0.0.rc.3)
middleman-sprockets (~> 4.1.1)
mime-types
sprockets (~> 4.0.2)
tzinfo-data
Expand Down
4 changes: 3 additions & 1 deletion config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
s3_sync.version_bucket = false
end

activate :sprockets
activate :sprockets do |sprockets|
sprockets.supported_output_extensions = ['.js']
end

caching_policy 'text/html', max_age: 0, must_revalidate: true
default_caching_policy max_age: 60*60*24*365

0 comments on commit 19719a6

Please sign in to comment.