1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Refactored moment.js out of app

Reduces bundle size by 25%
This commit is contained in:
Dan Brown
2018-04-01 14:10:12 +01:00
parent 736d7118b0
commit 0ade9b5b9b
7 changed files with 22 additions and 29 deletions

View File

@ -1,4 +1,4 @@
const moment = require('moment');
import * as Dates from "../services/dates";
let data = {
terms: '',
@ -153,7 +153,7 @@ let methods = {
},
enableDate(optionName) {
this.search.dates[optionName.toLowerCase()] = moment().format('YYYY-MM-DD');
this.search.dates[optionName.toLowerCase()] = Dates.getCurrentDay();
this.dateChange(optionName);
},