Swap Moment for date-fns and save 300KB

This commit is contained in:
Timothy Farrell 2017-12-23 01:11:55 -06:00
parent 7cb4d5a364
commit 081163f5a3
2 changed files with 3 additions and 3 deletions

View File

@ -13,11 +13,11 @@
}, },
"dependencies": { "dependencies": {
"css-loader": "^0.28.7", "css-loader": "^0.28.7",
"date-fns": "~1.29.0",
"domvm": "~3.2.1", "domvm": "~3.2.1",
"exif-parser": "~0.1.9", "exif-parser": "~0.1.9",
"extract-text-webpack-plugin": "^3.0.2", "extract-text-webpack-plugin": "^3.0.2",
"frptools": "3.0.1", "frptools": "3.0.1",
"moment": "~2.19.3",
"pica": "~2.0.8", "pica": "~2.0.8",
"pouchdb-adapter-http": "~6.3.4", "pouchdb-adapter-http": "~6.3.4",
"pouchdb-adapter-idb": "~6.3.4", "pouchdb-adapter-idb": "~6.3.4",

View File

@ -1,4 +1,4 @@
import * as moment from 'moment'; import { format } from 'date-fns';
import { prop, computed, container } from 'frptools'; import { prop, computed, container } from 'frptools';
import { import {
@ -43,7 +43,7 @@ export function AllImagesView(vm, params, key, { appbar }) {
const res = Object.entries(sectionMap).reduce( const res = Object.entries(sectionMap).reduce(
(acc, [date, sectionImages]) => (acc, [date, sectionImages]) =>
Object.assign(acc, { Object.assign(acc, {
[moment(date).format('LL')]: sectionImages [format(date, 'MMMM D, YYYY')]: sectionImages
}), }),
{} {}
); );