mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 03:44:25 -05:00
refactor: Remove require
extension filename
This commit is contained in:
parent
41f34735a1
commit
aca01f064d
10 changed files with 24 additions and 25 deletions
6
app.js
6
app.js
|
@ -22,9 +22,9 @@ var flash = require('connect-flash')
|
|||
var getImageMimeType = require('./lib/utils.js').getImageMimeType
|
||||
|
||||
// core
|
||||
var config = require('./lib/config.js')
|
||||
var logger = require('./lib/logger.js')
|
||||
var response = require('./lib/response.js')
|
||||
var config = require('./lib/config')
|
||||
var logger = require('./lib/logger')
|
||||
var response = require('./lib/response')
|
||||
var models = require('./lib/models')
|
||||
|
||||
// generate front-end constants by template
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
// external modules
|
||||
|
||||
// core
|
||||
var config = require('./config.js')
|
||||
var logger = require('./logger.js')
|
||||
var response = require('./response.js')
|
||||
var config = require('./config')
|
||||
var logger = require('./logger')
|
||||
var response = require('./response')
|
||||
var models = require('./models')
|
||||
|
||||
// public
|
||||
|
|
|
@ -5,8 +5,8 @@ var path = require('path')
|
|||
var Sequelize = require('sequelize')
|
||||
|
||||
// core
|
||||
var config = require('../config.js')
|
||||
var logger = require('../logger.js')
|
||||
var config = require('../config')
|
||||
var logger = require('../logger')
|
||||
|
||||
var dbconfig = config.db
|
||||
dbconfig.logging = config.debug ? logger.info : false
|
||||
|
|
|
@ -15,11 +15,11 @@ var dmp = new DiffMatchPatch()
|
|||
var S = require('string')
|
||||
|
||||
// core
|
||||
var config = require('../config.js')
|
||||
var logger = require('../logger.js')
|
||||
var config = require('../config')
|
||||
var logger = require('../logger')
|
||||
|
||||
// ot
|
||||
var ot = require('../ot/index.js')
|
||||
var ot = require('../ot')
|
||||
|
||||
// permission types
|
||||
var permissionTypes = ['freely', 'editable', 'limited', 'locked', 'protected', 'private']
|
||||
|
|
|
@ -7,8 +7,8 @@ var childProcess = require('child_process')
|
|||
var shortId = require('shortid')
|
||||
|
||||
// core
|
||||
var config = require('../config.js')
|
||||
var logger = require('../logger.js')
|
||||
var config = require('../config')
|
||||
var logger = require('../logger')
|
||||
|
||||
var dmpWorker = createDmpWorker()
|
||||
var dmpCallbackCache = {}
|
||||
|
|
|
@ -5,8 +5,8 @@ var Sequelize = require('sequelize')
|
|||
var scrypt = require('scrypt')
|
||||
|
||||
// core
|
||||
var logger = require('../logger.js')
|
||||
var letterAvatars = require('../letter-avatars.js')
|
||||
var logger = require('../logger')
|
||||
var letterAvatars = require('../letter-avatars')
|
||||
|
||||
module.exports = function (sequelize, DataTypes) {
|
||||
var User = sequelize.define('User', {
|
||||
|
|
|
@ -12,13 +12,13 @@ var chance = new Chance()
|
|||
var moment = require('moment')
|
||||
|
||||
// core
|
||||
var config = require('./config.js')
|
||||
var logger = require('./logger.js')
|
||||
var history = require('./history.js')
|
||||
var config = require('./config')
|
||||
var logger = require('./logger')
|
||||
var history = require('./history')
|
||||
var models = require('./models')
|
||||
|
||||
// ot
|
||||
var ot = require('./ot/index.js')
|
||||
var ot = require('./ot')
|
||||
|
||||
// public
|
||||
var realtime = {
|
||||
|
|
|
@ -10,8 +10,8 @@ var request = require('request')
|
|||
var moment = require('moment')
|
||||
|
||||
// core
|
||||
var config = require('./config.js')
|
||||
var logger = require('./logger.js')
|
||||
var config = require('./config')
|
||||
var logger = require('./logger')
|
||||
var models = require('./models')
|
||||
|
||||
// public
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
const Router = require('express').Router
|
||||
|
||||
const {urlencodedParser} = require('./utils')
|
||||
const history = require('../history.js')
|
||||
|
||||
const history = require('../history')
|
||||
const historyRouter = module.exports = Router()
|
||||
|
||||
// get history
|
||||
|
|
|
@ -4,8 +4,8 @@ var DiffMatchPatch = require('diff-match-patch')
|
|||
var dmp = new DiffMatchPatch()
|
||||
|
||||
// core
|
||||
var config = require('../config.js')
|
||||
var logger = require('../logger.js')
|
||||
var config = require('../config')
|
||||
var logger = require('../logger')
|
||||
|
||||
process.on('message', function (data) {
|
||||
if (!data || !data.msg || !data.cacheKey) {
|
||||
|
|
Loading…
Reference in a new issue