Skip to content

Commit

Permalink
Remove html5shiv (#1482)
Browse files Browse the repository at this point in the history
* Fix typo

* Lock file changes after running 'npm install --lockfile-version 1' w/ Node 14

* Format file prior to change

* Remove the html5shiv JS package & all references to it

* Remove the copy-webpack-plugin JS package as no longer used

---------

Co-authored-by: Manuel Kaufmann <[email protected]>
  • Loading branch information
mix4242 and humitos authored Jan 25, 2024
1 parent 80de90a commit 28c377f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 113 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ sphinx_rtd_theme/static/fonts/RobotoSlab/
.node-version
.tool-versions
.nvmrc
sphinx_rtd_theme/static/js/html5shiv.min.js
sphinx_rtd_theme/static/js/html5shiv-printshiv.min.js
.direnv/
.envrc
# Used for dockerized builds
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This implicitely includes Python 3.10
# This implicitly includes Python 3.10
FROM node:14-alpine

# Do not use --update since that will also fetch the
Expand Down
129 changes: 32 additions & 97 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
"url": "https://github.com/readthedocs/sphinx_rtd_theme/issues"
},
"homepage": "https://github.com/readthedocs/sphinx_rtd_theme",
"dependencies": {},
"devDependencies": {
"bourbon": "~4.3",
"bourbon-neat": "~1.9",
"copy-webpack-plugin": "^5.1.2",
"css-loader": "^3.6.0",
"file-loader": "^3.0.1",
"font-awesome": "^4.7.0",
"html5shiv": "^3.7.3",
"imports-loader": "^0.8.0",
"jquery": "^3.6.0",
"lato-font": "^3.0.0",
Expand Down
3 changes: 0 additions & 3 deletions sphinx_rtd_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@

{#- JAVASCRIPTS #}
{%- block scripts %}
<!--[if lt IE 9]>
<script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
<![endif]-->
{%- if not embedded %}
{%- for scriptfile in script_files %}
{{ js_tag(scriptfile) }}
Expand Down
7 changes: 0 additions & 7 deletions webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require('copy-webpack-plugin');

module.exports = {
entry: {
Expand Down Expand Up @@ -66,11 +65,5 @@ module.exports = {
filename: "css/[name].css?[hash]",
chunkFilename: "css/[name].css?[hash]"
}),
new CopyPlugin([
{
from: 'node_modules/html5shiv/dist/*.min.js',
flatten: true,
to: path.resolve(__dirname,'sphinx_rtd_theme/static/js') },
]),
]
};

0 comments on commit 28c377f

Please sign in to comment.