Small tweak

This commit is contained in:
MICHAEL JACKSON 2017-07-26 21:42:27 -04:00
parent dc1af59fa1
commit db947a6e9e
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,6 @@
const fs = require('fs')
const mime = require('mime')
const TextFiles = /\/?(\.[a-z]*rc|\.git[a-z]*|\.[a-z]*ignore)$/i
mime.define({
'text/plain': [
'license',
@ -14,6 +12,8 @@ mime.define({
]
})
const TextFiles = /\/?(\.[a-z]*rc|\.git[a-z]*|\.[a-z]*ignore)$/i
const getContentType = (file) =>
TextFiles.test(file) ? 'text/plain' : mime.lookup(file)