update npm deps, EXCEPT socket.io and backbone (#950)
* update npm dependencies (with some exceptions) * update autolinker, remove underscore
This commit is contained in:
parent
1317186f63
commit
d51e3f3b52
3 changed files with 34 additions and 35 deletions
|
@ -3,13 +3,12 @@
|
|||
import Backbone from 'backbone'
|
||||
import { Howl } from 'howler'
|
||||
import Autolinker from 'autolinker'
|
||||
import _ from 'lodash'
|
||||
import underscore from 'underscore'
|
||||
import { clone, template as lodashTemplate } from 'lodash'
|
||||
import outdent from 'outdent'
|
||||
// TODO is this line good or bad
|
||||
// Backbone.$ = window.$
|
||||
|
||||
const linker = new Autolinker({ newWindow: true, truncate: 50, email: false, phone: false, twitter: false })
|
||||
const linker = new Autolinker({ newWindow: true, truncate: 50, email: false, phone: false })
|
||||
|
||||
var Private = {
|
||||
messageHTML: outdent`
|
||||
|
@ -41,12 +40,13 @@ var Private = {
|
|||
<div class='clearfloat'></div>
|
||||
</div>`,
|
||||
templates: function() {
|
||||
underscore.templateSettings = {
|
||||
const templateSettings = {
|
||||
interpolate: /\{\{(.+?)\}\}/g
|
||||
}
|
||||
this.messageTemplate = underscore.template(Private.messageHTML)
|
||||
|
||||
this.participantTemplate = underscore.template(Private.participantHTML)
|
||||
this.messageTemplate = lodashTemplate(Private.messageHTML, templateSettings)
|
||||
|
||||
this.participantTemplate = lodashTemplate(Private.participantHTML, templateSettings)
|
||||
},
|
||||
createElements: function() {
|
||||
this.$unread = $('<div class="chat-unread"></div>')
|
||||
|
@ -147,7 +147,7 @@ var Private = {
|
|||
}
|
||||
return i
|
||||
}
|
||||
var m = _.clone(message.attributes)
|
||||
var m = clone(message.attributes)
|
||||
|
||||
m.timestamp = new Date(m.created_at)
|
||||
|
||||
|
@ -176,7 +176,7 @@ var Private = {
|
|||
$(document).trigger(ChatView.events.message + '-' + this.room, [message])
|
||||
},
|
||||
addParticipant: function(participant) {
|
||||
var p = _.clone(participant.attributes)
|
||||
var p = clone(participant.attributes)
|
||||
if (p.self) {
|
||||
p.selfClass = 'is-self'
|
||||
p.selfName = '(me)'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// create global references
|
||||
import _ from 'underscore'
|
||||
import _ from 'lodash'
|
||||
import Metamaps from './Metamaps'
|
||||
|
||||
window._ = _
|
||||
|
|
51
package.json
51
package.json
|
@ -18,46 +18,45 @@
|
|||
},
|
||||
"homepage": "https://github.com/metamaps/metamaps#readme",
|
||||
"dependencies": {
|
||||
"attachmediastream": "1.4.1",
|
||||
"autolinker": "0.17.1",
|
||||
"babel-cli": "6.14.0",
|
||||
"babel-loader": "6.2.5",
|
||||
"babel-plugin-lodash": "^3.2.9",
|
||||
"babel-plugin-transform-class-properties": "6.11.5",
|
||||
"babel-preset-es2015": "6.14.0",
|
||||
"babel-preset-react": "6.11.1",
|
||||
"attachmediastream": "1.4.2",
|
||||
"autolinker": "1.4.0",
|
||||
"babel-cli": "6.18.0",
|
||||
"babel-loader": "6.2.9",
|
||||
"babel-plugin-lodash": "3.2.10",
|
||||
"babel-plugin-transform-class-properties": "6.19.0",
|
||||
"babel-preset-es2015": "6.18.0",
|
||||
"babel-preset-react": "6.16.0",
|
||||
"backbone": "1.0.0",
|
||||
"clipboard-js": "git://github.com/devvmh/clipboard.js#patch-1",
|
||||
"commonmark": "0.26.0",
|
||||
"commonmark": "0.27.0",
|
||||
"csv-parse": "1.1.7",
|
||||
"getScreenMedia": "git://github.com/devvmh/getScreenMedia#patch-1",
|
||||
"hark": "git://github.com/devvmh/hark#patch-1",
|
||||
"howler": "2.0.1",
|
||||
"howler": "2.0.2",
|
||||
"json-loader": "0.5.4",
|
||||
"lodash": "4.16.1",
|
||||
"lodash": "4.17.2",
|
||||
"node-uuid": "1.4.7",
|
||||
"outdent": "0.2.1",
|
||||
"react": "15.3.2",
|
||||
"react-dom": "15.3.2",
|
||||
"react-dropzone": "3.6.0",
|
||||
"redux": "^3.6.0",
|
||||
"simplewebrtc": "2.2.0",
|
||||
"outdent": "0.3.0",
|
||||
"react": "15.4.1",
|
||||
"react-dom": "15.4.1",
|
||||
"react-dropzone": "3.7.3",
|
||||
"redux": "3.6.0",
|
||||
"simplewebrtc": "2.2.1",
|
||||
"socket.io": "1.3.7",
|
||||
"underscore": "1.4.4",
|
||||
"webpack": "1.13.2"
|
||||
"webpack": "1.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^6.1.2",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"chai": "^3.5.0",
|
||||
"circular-dependency-plugin": "^2.0.0",
|
||||
"eslint": "^3.5.0",
|
||||
"eslint-config-standard": "^6.2.0",
|
||||
"eslint-plugin-promise": "^2.0.1",
|
||||
"eslint-plugin-react": "^6.3.0",
|
||||
"eslint": "^3.11.1",
|
||||
"eslint-config-standard": "^6.2.1",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"eslint-plugin-react": "^6.8.0",
|
||||
"eslint-plugin-standard": "^2.0.1",
|
||||
"mocha": "^3.0.2"
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"raml2html": "4.0.0-beta5"
|
||||
"raml2html": "4.0.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue