1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-01 03:00:09 +02:00

add prettier support for js,css,markdown fixes #234

This commit is contained in:
Kushagra Gour
2018-10-14 16:30:28 +05:30
parent ee06e8c546
commit 41ae269d9b
6 changed files with 104 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import { h } from 'preact';
import { getExtensionFromFileName } from '../fileUtils';
export function FileIcon({ file }) {
let path;
@@ -24,7 +25,7 @@ export function FileIcon({ file }) {
);
}
} else {
const type = file.name.match(/.(\w+)$/)[1];
const type = getExtensionFromFileName(file.name);
switch (type) {
case 'html':
path = (