Faster dev builds

Former-commit-id: 5e71565bcf0898f9f6e39ef2c81d36e8f233c6cf [formerly f457fc58ed639bf772b2b6a2c2193da0b64426f1] [formerly 3f7e5d9ed180d44b55634eb256da03ec368c6527 [formerly 4132ddf806]]
Former-commit-id: 07bfec69fcf62facd7103ec0add4c54f3f92b4bc [formerly 352b0db0c60a8314b758dd9d1b925c36cd1ff381]
Former-commit-id: cf2ab3f5eb95279b033451dd7e2795055ab210f2
This commit is contained in:
Henrique Dias committed 2017-07-05 18:24:04 +01:00
1 parent 2d528a6a4e
commit a3bafdc3e0
5 files changed
+44 -31

No files matched your search

+9 -5
View File
@@ -27,18 +27,22 @@ export default {
}
},
mounted: function () {
CodeMirror.modeURL = this.$store.state.baseURL + '/static/js/codemirror/mode/%N/%N.js'
this.content = CodeMirror.fromTextArea(document.getElementById('content'), {
lineNumbers: (this.req.language !== 'markdown'),
viewportMargin: Infinity
viewportMargin: Infinity,
autofocus: true
})
CodeMirror.autoLoadMode(this.content, this.req.language)
// Prevent of going on if there is no metadata.
if (!this.hasMetadata) {
return
}
this.metadata = CodeMirror.fromTextArea(document.getElementById('metadata'), {
viewportMargin: Infinity
})
CodeMirror.autoLoadMode(this.content, this.req.language)
},
methods: {
}