Use local Moment.js instead of Discord’s

Fixes a recursive dependency issue
This commit is contained in:
Samuel Elliott 2018-05-20 00:46:15 +01:00
parent 8d8c1a8080
commit 665c1d5fe4
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
4 changed files with 11 additions and 9 deletions

View File

@ -8,10 +8,10 @@
* LICENSE file in the root directory of this source tree.
*/
import { WebpackModules } from './webpackmodules';
import jQuery from 'jquery';
import lodash from 'lodash';
import Vue from 'vue';
import moment from 'moment';
export { jQuery as $ };
@ -32,15 +32,11 @@ export default class {
/**
* Moment
*/
static get moment() {
return WebpackModules.getModuleByName('Moment');
}
static get moment() { return moment }
/**
* Vue
*/
static get Vue() {
return Vue;
}
static get Vue() { return Vue }
}

View File

@ -8,8 +8,8 @@
* LICENSE file in the root directory of this source tree.
*/
import { Vendor } from 'modules';
import { FileUtils } from './utils';
import moment from 'moment';
import node_utils from 'node_utils';
export const logLevels = {
@ -60,7 +60,7 @@ export default class Logger {
}
static get timestamp() {
return Vendor.moment().format('DD/MM/YY hh:mm:ss');
return moment().format('DD/MM/YY hh:mm:ss');
}
}

5
package-lock.json generated
View File

@ -7951,6 +7951,11 @@
"minimist": "0.0.8"
}
},
"moment": {
"version": "2.22.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz",
"integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ=="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",

View File

@ -16,6 +16,7 @@
},
"private": false,
"dependencies": {
"moment": "^2.22.1",
"nedb": "^1.8.0",
"node-sass": "^4.7.2"
},