-
Notifications
You must be signed in to change notification settings - Fork 52
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
Middleman 4.3 only supports SassC. Middleman-Sprockets needs to migrate to SassC as well #132
Comments
Hi, Do you think this ticket might be the cause of my issue? |
I expect so. Which version of |
running middleman 4.3.2 |
@Valerz try dropping down to 4.2.x for now |
@tdreyno looks like a Windows os issue. |
I temporarily worked around this with adding |
I stumbled upon this in my project, while trying (mostly successfuly) to upgrade MM 4.2.1 project using Ruby-Sass and Middleman-Sprockets to Mm 4.3.3 and SassC. Same results as @Valerz describes: Ruby version: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16] I understand that there is no solution yet, other than reverting back to my older MM 4.2.x (and Ruby-Sass)? My usage of Sprockets is very basic, only the js By the way: why MM 3.3.x is supporting SassC only? Are the changes in the code breaking backwards compatibility with older Ruby-Sass? |
Ruby-Sass is end of life'd. Everyone is having to switch to SassC. Synchronizing with Sprocket's migration is a headache. I'm not sure where this is now. It might be as simple as upgrading our copy of Sprockets... but that upgrade has always been painful as they assume Rails is their only API consumer. Pinging @stevenosloan who had taken over maintenance of this repo. |
Is there any documentation for a migration path? |
Middleman has updated to sassc but sprockets hasnt, so need to include sass gem manually in the meantime see this thread - middleman/middleman-sprockets#132
As right now that’s required by middleman-sprockets - middleman/middleman-sprockets#132
The `sass` ruby gem is deprecated and `libsassc` (gem name: `sassc`) is a much-faster, drop-in replacement. Unfortunately `middleman-sprockets` isn't always happy with the new gem[1] so include the old one as well in the bundle. As per the code changes, point towards a standard and IE-specific manifests, which in turn include the GOV.UK Frontend assets with the correct ie-specific variables set in the latter case. (re)compile-time greatly reduced. [1]: middleman/middleman-sprockets#132
The `sass` ruby gem is deprecated and `libsassc` (gem name: `sassc`) is a much-faster, drop-in replacement. Unfortunately `middleman-sprockets` isn't always happy with the new gem[1] so include the old one as well in the bundle. As per the code changes, point towards a standard and IE-specific manifests, which in turn include the GOV.UK Frontend assets with the correct ie-specific variables set in the latter case. (re)compile-time greatly reduced. [1]: middleman/middleman-sprockets#132
The `sass` ruby gem is deprecated and `libsassc` (gem name: `sassc`) is a much-faster, drop-in replacement. Unfortunately `middleman-sprockets` isn't always happy with the new gem[1] so include the old one as well in the bundle. As per the code changes, point towards a standard and IE-specific manifests, which in turn include the GOV.UK Frontend assets with the correct ie-specific variables set in the latter case. (re)compile-time greatly reduced. [1]: middleman/middleman-sprockets#132
As right now that’s required by middleman-sprockets - middleman/middleman-sprockets#132
The `sass` ruby gem is deprecated and `libsassc` (gem name: `sassc`) is a much-faster, drop-in replacement. Unfortunately `middleman-sprockets` isn't always happy with the new gem[1] so include the old one as well in the bundle. As per the code changes, point towards a standard and IE-specific manifests, which in turn include the GOV.UK Frontend assets with the correct ie-specific variables set in the latter case. (re)compile-time greatly reduced. [1]: middleman/middleman-sprockets#132
we want the upgrade because it moves us away from the deprecated Ruby `sass` (although still need to include it for compatibility purposes[1]), gives us lots of speed and fixes a bug where a govuk mixin cannot be resolved. [1]: middleman/middleman-sprockets#132
we want the upgrade because it moves us away from the deprecated Ruby `sass` (although still need to include it for compatibility purposes[1]), gives us lots of speed and fixes a bug where a govuk mixin cannot be resolved. [1]: middleman/middleman-sprockets#132
we want the upgrade because it moves us away from the deprecated Ruby `sass` (although still need to include it for compatibility purposes[1]), gives us lots of speed and fixes a bug where a govuk mixin cannot be resolved. [1]: middleman/middleman-sprockets#132
What is the status on this? With larger projects using ruby-sass is abysmally slow. |
Current status is that this repo is unmaintained. Would happily merge any PR that brought it up to date with modern sprockets (and I assume sassc) |
@tdreyno is there an alternative to this for middleman? Just confused why it's not longer maintained. |
The frontend world moved away from sprockets to stuff like Webpack. We deprecated support for sprockets in favor of a system which allows arbitrary javascript tooling when version 4 came out (2015): https://middlemanapp.com/advanced/asset-pipeline/ For a while, folks were maintaining this as they migrated to the new system. Seems like its been enough time that it has atrophied entirely. If you look at the Sprockets releases, maintained by the Rails team, it seems that dev has pretty much stopped: https://rubygems.org/gems/sprockets/versions For modern sites, I don't think you need a pipeline or tooling at all. CSS has a module system ( On some sites, I run |
Guess I gotta do some reading and get myself up to date. I use @import for my SASS. Main issue for me is coffeescript requires to be honest. |
Gotcha. I believe Middleman code will compile your coffee script files (without sprockets) if you have the coffee script gem in your Gemfile. You'd need to find a way to replace the include/require parts with modern JS versions or a module/js compiler like webpack. You could also downgrade to Middleman 4.2 which doesn't rely on the current version of Sass, so may work well with old sprockets. |
Thanks for the info!
…On Sat, Oct 5, 2019 at 3:04 PM Thomas Reynolds ***@***.***> wrote:
Gotcha. I believe Middleman code will compile your coffee script files
(without sprockets) if you have the coffee script gem in your Gemfile.
You'd need to find a way to replace the include/require parts with modern
JS versions or a module/js compiler like webpack.
You could also downgrade to Middleman 4.2 which doesn't rely on the
current version of Sass, so may work well with old sprockets.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#132?email_source=notifications&email_token=AAEX7NFKLJ2NLT6HMBDVRQDQNDQK7A5CNFSM4GVC2J7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANZRZY#issuecomment-538679527>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEX7NDPJ3V3LD3KRZHQDL3QNDQK7ANCNFSM4GVC2J7A>
.
--
Regards,
Jarrett Lusso
|
middleman-sprockets is deprecated[1] so remove all of our terrible hacks and stick with SASS import statements. Remove the hard dependency on SASS as well since Middleman ships with it. Remove the govuk_template dependency as we don't use it either. This will also make the bundle smaller and faster (the node_modules folder is +8M smaller). [1]: middleman/middleman-sprockets#132 (comment)
I was able to get it to work with middleman 4.3.6, middleman-sprockets 4.1.1 and sprockets 3.7.2 by adding this line in
Ugly hack (you still get the warning 'consider using Sprockets 4.x to render with SassC') but it works until we find the time to refactor the asset pipeline. |
Thanks for sharing that, @ojundt ! |
Bump middleman-autoprefixer from 2.10.1 to 3.0.0 Sprockets needs to be locked at 3.7.2 due to middleman/middleman-sprockets#132 and middleman/middleman#2302 Just trying to bump dependencies as much as possible; not refactor/replace the asset pipeline just now.
Bump middleman-autoprefixer from 2.10.1 to 3.0.0 Sprockets needs to be locked at 3.7.2 due to middleman/middleman-sprockets#132 and middleman/middleman#2302 Just trying to bump dependencies as much as possible; not refactor/replace the asset pipeline just now.
Bump middleman-autoprefixer from 2.10.1 to 3.0.0 Sprockets needs to be locked at 3.7.2 due to middleman/middleman-sprockets#132 and middleman/middleman#2302 Just trying to bump dependencies as much as possible; not refactor/replace the asset pipeline just now.
Just leaving a comment so i can find this again. I couldnt get @ojundt fix to work. it said: warning: already initialized constant Sprockets::Autoload::Sass which it didnt. it just outputted the scss file unprocessed. Getting a basic bootstrap demo working on a new install of middleman 4 today has been tricky. so giving up on sprockets for now. |
@asecondwill I gave up on Sprockets a fews weeks ago and just use an external pipeline instead with Dart Sass installed through Homebrew. Here is the relevant configuration from my config.rb file: activate :external_pipeline,
name: :sass,
command: "/opt/homebrew/bin/sass --no-source-map #{ build? ? '' : '--watch' } --load-path=node_modules --load-path=source/images source/stylesheets/_application.scss:build/assets/application.css",
source: "build/assets" I have something similar to concatenate my JS files. Hope this helps! |
No description provided.
The text was updated successfully, but these errors were encountered: