Skip to content

Commit

Permalink
Use lodash-amd library.
Browse files Browse the repository at this point in the history
Fixes #1298
  • Loading branch information
chrisknoll committed Feb 5, 2019
1 parent c6febcd commit eae47d0
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 4 deletions.
77 changes: 77 additions & 0 deletions js/assets/lodash-slim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
define((require, exports) => {
const bind = require('lodash-amd/bind');
const chain = require('lodash-amd/chain');
const cloneDeep = require('lodash-amd/cloneDeep');
const curry = require('lodash-amd/curry');
const debounce = require('lodash-amd/debounce');
const difference = require('lodash-amd/difference');
const differenceWith = require('lodash-amd/differenceWith');
const each = require('lodash-amd/each');
const eq = require('lodash-amd/eq');
const extend = require('lodash-amd/extend');
const find = require('lodash-amd/find');
const first = require('lodash-amd/first');
const flatten = require('lodash-amd/flatten');
const get = require('lodash-amd/get');
const has = require('lodash-amd/has');
const intersection = require('lodash-amd/intersection');
const isEmpty = require('lodash-amd/isEmpty');
const isFinite = require('lodash-amd/isFinite');
const isObject = require('lodash-amd/isObject');
const keys = require('lodash-amd/keys');
const map = require('lodash-amd/map');
const max = require('lodash-amd/max');
const merge = require('lodash-amd/merge');
const omit = require('lodash-amd/omit');
const once = require('lodash-amd/once');
const pick = require('lodash-amd/pick');
const setWith = require('lodash-amd/setWith');
const some = require('lodash-amd/some');
const sortBy = require('lodash-amd/sortBy');
const toPairs = require('lodash-amd/toPairs');
const reduce = require('lodash-amd/reduce');
const sum = require('lodash-amd/sum');
const uniq = require('lodash-amd/uniq');
const unset = require('lodash-amd/unset');
const values = require('lodash-amd/values');
const without = require('lodash-amd/without');

return {
bind,
chain,
cloneDeep,
curry,
debounce,
difference,
each,
eq,
extend,
find,
first,
flatten,
get,
has,
intersection,
isEmpty,
isFinite,
isObject,
keys,
map,
max,
merge,
omit,
once,
pick,
setWith,
some,
sortBy,
toPairs,
reduce,
sum,
uniq,
unset,
values,
without
};

});
6 changes: 3 additions & 3 deletions js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ const settingsObject = {
location: "pages",
},
{
name: "lodash",
location: "../node_modules/lodash",
main: "lodash",
name: "lodash-amd",
location: "../node_modules/lodash-amd"
},
{
name: "urijs",
Expand Down Expand Up @@ -114,6 +113,7 @@ const settingsObject = {
"appConfig": "config",
"prism": "../node_modules/prismjs/prism",
"js-cookie": "../node_modules/js-cookie/src/js.cookie",
"lodash": "assets/lodash-slim",

"d3": "../node_modules/d3/build/d3",
"d3-tip": "../node_modules/d3-tip/dist/index",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"knockout-mapping": "^2.6.0",
"knockout-sortable": "^1.1.0",
"less": "^3.8.1",
"lodash": "^4.17.11",
"lodash-amd": "^4.17.11",
"lscache": "^1.3.0",
"lz-string": "^1.4.4",
"moment": "^2.22.2",
Expand Down

0 comments on commit eae47d0

Please sign in to comment.