Better dev server integration

This commit is contained in:
MICHAEL JACKSON
2018-02-16 16:00:06 -08:00
parent a22e0fa801
commit d6f2bc089a
42 changed files with 1753 additions and 1154 deletions

View File

@ -0,0 +1,13 @@
const mime = require("mime")
mime.define({
"text/plain": ["authors", "changes", "license", "makefile", "patents", "readme", "ts", "flow"]
})
const TextFiles = /\/?(\.[a-z]*rc|\.git[a-z]*|\.[a-z]*ignore)$/i
function getFileContentType(file) {
return TextFiles.test(file) ? "text/plain" : mime.lookup(file)
}
module.exports = getFileContentType