refactor: Remove require extension filename

This commit is contained in:
BoHong Li 2017-04-13 00:20:28 +08:00 committed by Raccoon Li
parent 41f34735a1
commit aca01f064d
10 changed files with 24 additions and 25 deletions

6
app.js
View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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']

View file

@ -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 = {}

View file

@ -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', {

View file

@ -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 = {

View file

@ -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

View file

@ -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

View file

@ -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) {