Commit 901b4eb8 authored by Robert Knight's avatar Robert Knight

Remove jQuery dependency and JS bundle

Following #2645 jQuery is no longer used by the Hypothesis client.
parent 63e2e3af
......@@ -54,7 +54,6 @@
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"hammerjs": "^2.0.4",
"jquery": "^3.2.1",
"js-polyfills": "^0.1.16",
"karma": "^5.0.1",
"karma-browserify": "^7.0.0",
......@@ -115,8 +114,7 @@
]
},
"browser": {
"fetch-mock": "./node_modules/fetch-mock/cjs/client.js",
"jquery": "./node_modules/jquery/dist/jquery.slim.js"
"fetch-mock": "./node_modules/fetch-mock/cjs/client.js"
},
"main": "./build/boot.js",
"scripts": {
......
......@@ -8,7 +8,6 @@
module.exports = {
bundles: {
jquery: ['jquery'],
katex: ['katex'],
sentry: ['@sentry/browser'],
showdown: ['showdown'],
......@@ -18,10 +17,10 @@ module.exports = {
//
// Modules may be excluded from parsing for two reasons:
//
// 1. The module is large (eg. jQuery) and contains no require statements,
// 1. The module is large and contains no require statements,
// so skipping parsing speeds up the build process.
// 2. The module is itself a compiled Browserify bundle containing
// internal require() statements, which should not be processed
// when including the bundle in another project.
noParseModules: ['jquery'],
noParseModules: [],
};
......@@ -111,7 +111,6 @@ function bootHypothesisClient(doc, config) {
injectAssets(doc, config, [
// Vendor code and polyfills
...polyfills,
'scripts/jquery.bundle.js',
// Main entry point for the client
'scripts/annotator.bundle.js',
......
......@@ -33,7 +33,6 @@ describe('bootstrap', function () {
'scripts/polyfills-es2015.bundle.js',
// Annotation layer
'scripts/jquery.bundle.js',
'scripts/annotator.bundle.js',
'styles/annotator.css',
'styles/pdfjs-overrides.css',
......@@ -82,7 +81,6 @@ describe('bootstrap', function () {
runBoot();
const expectedAssets = [
'scripts/annotator.bundle.1234.js',
'scripts/jquery.bundle.1234.js',
'styles/annotator.1234.css',
'styles/pdfjs-overrides.1234.css',
].map(assetUrl);
......
......@@ -4964,11 +4964,6 @@ jmespath@0.15.0:
resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217"
integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=
jquery@^3.2.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5"
integrity sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==
js-polyfills@^0.1.16:
version "0.1.43"
resolved "https://registry.yarnpkg.com/js-polyfills/-/js-polyfills-0.1.43.tgz#6ec32030b05dc71a4257a950d1c4eaf301bb8035"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment