diff --git a/gulpfile.js b/gulpfile.js index ebbe5df5e..dbbba2fc8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,7 +12,14 @@ sass.compiler = require("dart-sass"); let eslintConfig = { parser: "babel-eslint", - globals: ["firebase", "ClipboardItem"], + globals: [ + "jQuery", + "$", + "firebase", + "moment", + "html2canvas", + "ClipboardItem", + ], envs: ["es6", "browser", "node"], rules: { "constructor-super": "error", diff --git a/package-lock.json b/package-lock.json index e8b5a1df9..120440f6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1777,11 +1777,6 @@ } } }, - "base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==" - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2663,14 +2658,6 @@ "randomfill": "^1.0.3" } }, - "css-line-break": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz", - "integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==", - "requires": { - "base64-arraybuffer": "^0.2.0" - } - }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -4806,14 +4793,6 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, - "html2canvas": { - "version": "1.0.0-rc.7", - "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.7.tgz", - "integrity": "sha512-yvPNZGejB2KOyKleZspjK/NruXVQuowu8NnV2HYG7gW7ytzl+umffbtUI62v2dCHQLDdsK6HIDtyJZ0W3neerA==", - "requires": { - "css-line-break": "1.1.1" - } - }, "htmlescape": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", @@ -5429,29 +5408,6 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" - }, - "jquery-color": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/jquery-color/-/jquery-color-2.2.0.tgz", - "integrity": "sha512-4VoxsLMw860EQGNT/TmP3Lbr7/1OCQlBPS4ILj7bxRApJrPQfpqzdIOTY8Ll9nGY7UHtWqDuzR7cUcS1lcWjVw==" - }, - "jquery-easing": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/jquery-easing/-/jquery-easing-0.0.1.tgz", - "integrity": "sha1-s8N1JbVXNNwe4a0JtsM3MYdodxU=", - "requires": { - "jquery": "*" - } - }, - "jquery.cookie": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jquery.cookie/-/jquery.cookie-1.4.1.tgz", - "integrity": "sha1-1j3OIJ6raR/mMxbbCMqeR+D5OFs=" - }, "js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", diff --git a/package.json b/package.json index e78c254aa..35d9c14af 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "deploy:live:functions": "npm run build && firebase deploy -P live --only functions", "deploy:live": "npm run build && firebase deploy -P live" }, + "engines": { + "node": "10" + }, "devDependencies": { "@babel/core": "^7.12.3", "@babel/plugin-transform-runtime": "^7.12.1", @@ -42,12 +45,6 @@ "@babel/runtime": "^7.12.5", "chart.js": "^2.9.4", "chartjs-plugin-annotation": "^0.5.7", - "chartjs-plugin-trendline": "^0.2.2", - "html2canvas": "^1.0.0-rc.7", - "jquery": "^3.5.1", - "jquery-color": "^2.2.0", - "jquery-easing": "0.0.1", - "jquery.cookie": "^1.4.1", - "moment": "^2.29.1" + "chartjs-plugin-trendline": "^0.2.2" } } diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js index b5653dd6d..38f9239aa 100644 --- a/src/js/global-dependencies.js +++ b/src/js/global-dependencies.js @@ -1,19 +1,12 @@ -// this file should be concatenated at the top of the legacy js files - -import $ from "jquery"; -import "jquery-color"; -import "jquery-easing"; -import "jquery.cookie"; +//this file should be concatenated at the top of the legacy js files import Chart from "chart.js"; import chartTrendline from "chartjs-plugin-trendline"; import chartAnnotation from "chartjs-plugin-annotation"; + Chart.plugins.register(chartTrendline); Chart.plugins.register(chartAnnotation); -import moment from "moment"; -import html2canvas from "html2canvas"; - import { db_getSnapshot, db_setSnapshot, diff --git a/static/index.html b/static/index.html index 3b05ebc53..285bf37ea 100644 --- a/static/index.html +++ b/static/index.html @@ -947,9 +947,7 @@
-