Small tweak
This commit is contained in:
parent
dc1af59fa1
commit
db947a6e9e
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue