Skip to content

Remove unused JS#68

Open
phette23 wants to merge 2 commits intomainfrom
rmModernizr
Open

Remove unused JS#68
phette23 wants to merge 2 commits intomainfrom
rmModernizr

Conversation

@phette23
Copy link
Member

This PR has two commits that remove a lot of code which shouldn't be needed anymore. I can split it up if we would rather consider the commits independently.

The first commit removes the combined Modernizr + Respond.js script referenced in _includes/header.html, see #66. This code isn't relevant given the features of modern web browsers.

The second commit removes the entire node_modules folder, package.json, package-lock.json, and moves the Bootstrap SCSS files into assets/_scss while updating one reference to the bootstrap.scss index file. We were not using npm normally and tracking a node_modules folder is rather unusual. This removes many files and I do not think it makes updating Bootstrap in the future much more difficult.

Test Plan

There should be no visible effect on the site, but because this removes a lot of code, I tested comprehensively:

  • Home page
  • Speakers page
    • Click open/closed a speaker image
  • Sponsors page
  • Schedule for one day
    • Scroll up/down the schedule
    • Click into a presentation
  • Workshops
    • Use the AM/PM filters
  • View a few General Info pages

Then repeat all of these steps using a mobile view, e.g. in browser dev tools. It's also good to look for JS errors in the browser's console due to missing files.

these libraries were unused
the npm.js script also appears to be used, perhaps from a prior
build that used grunt or another npm build script
we are tracking the node_modules folder and not using npm in a typical manner
this commit removes the node_modules folder and moves the (tracked) bootstrap
dependency into our _scss folder, which then allows us to remove the npm
package.json and lock file
we are using jquery and popper.js but we weren't referencing the files in
node_modules but ones in CDNs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant