client/general: replace underscore with lodash
This commit is contained in:
parent
d123f27815
commit
2cba1a432f
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
require('../util/polyfill.js');
|
||||
const underscore = require('underscore');
|
||||
const lodash = require('lodash');
|
||||
const tags = require('../tags.js');
|
||||
const events = require('../events.js');
|
||||
const domParser = new DOMParser();
|
||||
|
@ -240,12 +240,12 @@ function getTemplate(templatePath) {
|
|||
return null;
|
||||
}
|
||||
const templateText = templates[templatePath].trim();
|
||||
const templateFactory = underscore.template(templateText);
|
||||
const templateFactory = lodash.template(templateText);
|
||||
return ctx => {
|
||||
if (!ctx) {
|
||||
ctx = {};
|
||||
}
|
||||
underscore.extend(ctx, {
|
||||
lodash.extend(ctx, {
|
||||
makeRelativeTime: makeRelativeTime,
|
||||
makeThumbnail: makeThumbnail,
|
||||
makeRadio: makeRadio,
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
"html-minifier": "^1.3.1",
|
||||
"js-cookie": "^2.1.0",
|
||||
"js-yaml": "^3.5.5",
|
||||
"lodash": "^4.12.0",
|
||||
"merge": "^1.2.0",
|
||||
"mousetrap": "^1.5.3",
|
||||
"nprogress": "^0.2.0",
|
||||
"page": "^1.7.1",
|
||||
"stylus": "^0.54.2",
|
||||
"superagent": "^1.8.3",
|
||||
"uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony",
|
||||
"underscore": "^1.8.3"
|
||||
"uglify-js": "git://github.com/mishoo/UglifyJS2.git#harmony"
|
||||
},
|
||||
"devDependencies": {
|
||||
"watch": "latest"
|
||||
|
|
Loading…
Reference in New Issue