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

Upgrade to Middleman 4 #9

Merged
merged 1 commit into from Sep 12, 2019
Merged

Upgrade to Middleman 4 #9

merged 1 commit into from Sep 12, 2019

Conversation

@EvanHahn
Copy link
Collaborator

EvanHahn commented Sep 11, 2019

This commit upgrades from Middleman 3.3.3 to 4.3.5. That entailed:

  1. Upgrading the middleman and middleman-livereload gems.
  2. In the config, converting set calls to updates to the config hash. This wasn't strictly necessary, but Middleman's docs claim that it's a "somewhat newer syntax", so I thought I'd future-proof while I was there.
  3. Removed Compass. While the "Upgrading to v4" doc claims that Compass was "still bundled by default", I was never able to reproduce this. A git grep -i compass in the Middleman source gave nothing helpful (four comments and one log message; no installed compass gem or similar). Luckily, we were only using Compass in three places—one that was completely unused (user-select), one that was easy to replicate (the appearance mixin), and one that I felt safe to replace with the version built into browsers (transition).
  4. Replaced Sprockets directives with a bunch of included JavaScript files. Sprockets seems to have been removed from Middleman v4 and relegated to the middleman-sprockets extension, but that immediately crashed with Sass-related errors (seemingly because it was unable to require the deprecated-since-March sass gem). I replaced this with a bunch of <script> tags. While I'd prefer to concatenate these files, that would require setting up some additional infrastructure which I felt was out of scope for this commit.

Closes #2.

This commit upgrades from Middleman 3.3.3 to 4.3.5. That entailed:

1. Upgrading the `middleman` and `middleman-livereload` gems.

2. In the config, converting `set` calls to updates to the `config`
   hash. This wasn't strictly necessary, but [Middleman's docs claim
   that it's a "somewhat newer syntax"][1], so I thought I'd
   future-proof while I was there.

3. Removed Compass. While the ["Upgrading to v4" doc][2] claims that
   Compass was "still bundled by default", I was never able to reproduce
   this. A `git grep -i compass` in the Middleman source gave nothing
   helpful (four comments and one log message; no installed `compass`
   gem or similar). Luckily, we were only using Compass in three
   places—one that was completely unused (`user-select`), one that was
   easy to replicate (the `appearance` mixin), and one that I felt safe
   to replace with the version built into browsers (`transition`).

4. Replaced Sprockets directives with a bunch of included JavaScript
   files. Sprockets seems to have been removed from Middleman v4 and
   relegated to the [`middleman-sprockets` extension][3], but that
   immediately crashed with Sass-related errors (seemingly because it
   was unable to require the [deprecated-since-March `sass` gem][4]). I
   replaced this with a bunch of `<script>` tags. While I'd prefer to
   concatenate these files, that would require setting up some
   additional infrastructure which I felt was out of scope for this
   commit.

Closes [issue #2][5].

[1]: https://middlemanapp.com/advanced/configuration/#changing-settings
[2]: https://middlemanapp.com/basics/upgrade-v4/
[3]: https://github.com/middleman/middleman-sprockets
[4]: https://sass-lang.com/ruby-sass
[5]: #2
@EvanHahn EvanHahn force-pushed the upgrade_to_middleman_4 branch from 7e9b813 to 67cf6e1 Sep 11, 2019
Copy link
Collaborator

dtoakley left a comment

Looks good and my locally testing worked well! LMTD (let's merge this down)

@dtoakley dtoakley merged commit 6354e44 into master Sep 12, 2019
5 checks passed
5 checks passed
Header rules - 350poster No header rules processed
Details
Pages changed - 350poster 3 new files uploaded
Details
Redirect rules - 350poster No redirect rules processed
Details
Mixed content - 350poster No mixed content detected
Details
netlify/350poster/deploy-preview Deploy preview ready!
Details
@dtoakley dtoakley deleted the upgrade_to_middleman_4 branch Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.