From 9758039f5f8181393dcc607ad1b49b506c8c9d15 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 13 Feb 2018 10:12:52 -0800 Subject: [PATCH] reduce bundle size with timeago.js --- package-lock.json | 34 +++++++------------ package.json | 2 +- .../status/StatusRelativeDate.html | 7 ++-- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6cc8ed4..1e3110a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,11 @@ "resolved": "https://registry.npmjs.org/@gamestdio/websocket/-/websocket-0.2.2.tgz", "integrity": "sha512-ptWTKBq6IliC7lNhfAI/YI5WBjhPClflZV61V7In/qxGbgrWrlny6/Df4NtrUs7QUeNccv8yqQwjjw+f0veGjQ==" }, + "@types/jquery": { + "version": "2.0.48", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.48.tgz", + "integrity": "sha512-nNLzUrVjaRV/Ds1eHZLYTd7IZxs38cwwLSaqMJj8OTXY8xNUbxSK69bi9cMLvQ7dm/IBeQ1wHwQ0S1uYa0rd2w==" + }, "@types/node": { "version": "9.4.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.0.tgz", @@ -3957,27 +3962,6 @@ "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.5.0.tgz", "integrity": "sha512-8Zgt4ijlyvIrQVTA7MPb2W9+KhoetrAbxlh0RmTGxpx0+ZsAXvy7IsbNnZIrqZ6TddAdWeQj49x7Ph7Ir6KRkA==" }, - "intl-messageformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-2.2.0.tgz", - "integrity": "sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw=", - "requires": { - "intl-messageformat-parser": "1.4.0" - } - }, - "intl-messageformat-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz", - "integrity": "sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU=" - }, - "intl-relativeformat": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz", - "integrity": "sha1-AQ8RBYAiUfQKxH0OPhogE0iiVd8=", - "requires": { - "intl-messageformat": "2.2.0" - } - }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", @@ -8009,6 +7993,14 @@ "xtend": "4.0.1" } }, + "timeago.js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-3.0.2.tgz", + "integrity": "sha1-MqZ+fA2IfqQspYjTquJvd95edsw=", + "requires": { + "@types/jquery": "2.0.48" + } + }, "timers-browserify": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", diff --git a/package.json b/package.json index 14e08c3..50cc6dc 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "idb-keyval": "^2.3.0", "indexeddb-getall-shim": "^1.3.1", "intersection-observer": "^0.5.0", - "intl-relativeformat": "^2.1.0", "lodash": "^4.17.4", "lodash-webpack-plugin": "^0.11.4", "node-fetch": "^1.7.3", @@ -54,6 +53,7 @@ "svelte-loader": "^2.3.3", "svelte-transitions": "^1.1.1", "svgo": "^1.0.3", + "timeago.js": "^3.0.2", "tiny-queue": "^0.2.1", "uglifyjs-webpack-plugin": "^1.1.5", "url-search-params": "^0.10.0", diff --git a/routes/_components/status/StatusRelativeDate.html b/routes/_components/status/StatusRelativeDate.html index 596cdf5..f122f8c 100644 --- a/routes/_components/status/StatusRelativeDate.html +++ b/routes/_components/status/StatusRelativeDate.html @@ -26,10 +26,9 @@