diff --git a/gulpfile.js b/gulpfile.js index 5b0b491e2..8e2f85e14 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,14 +12,7 @@ sass.compiler = require("dart-sass"); let eslintConfig = { parser: "babel-eslint", - globals: [ - "jQuery", - "$", - "firebase", - "moment", - "html2canvas", - "ClipboardItem", - ], + globals: ["jQuery", "$", "firebase", "html2canvas", "ClipboardItem"], envs: ["es6", "browser", "node"], rules: { "constructor-super": "error", diff --git a/package.json b/package.json index 35d9c14af..061174e45 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "deploy:live": "npm run build && firebase deploy -P live" }, "engines": { - "node": "10" + "node": ">=10" }, "devDependencies": { "@babel/core": "^7.12.3", @@ -45,6 +45,7 @@ "@babel/runtime": "^7.12.5", "chart.js": "^2.9.4", "chartjs-plugin-annotation": "^0.5.7", - "chartjs-plugin-trendline": "^0.2.2" + "chartjs-plugin-trendline": "^0.2.2", + "moment": "^2.29.1" } } diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js index 1d699615f..bcc034777 100644 --- a/src/js/global-dependencies.js +++ b/src/js/global-dependencies.js @@ -1,9 +1,11 @@ -//this file should be concatenated at the top of the legacy js files +// 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"; +import moment from "moment"; + Chart.plugins.register(chartTrendline); Chart.plugins.register(chartAnnotation); diff --git a/static/index.html b/static/index.html index d860a09ba..07ce4ec8d 100644 --- a/static/index.html +++ b/static/index.html @@ -947,7 +947,9 @@
-