diff --git a/README.md b/README.md index d5dc79a..15b05e7 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Marker has 2 kinds of support for languages: * C++ * Python * Markdown +* Shell/Bash scripts * More comming soon... Made with ❤ by [Fructo](https://fructo.land) diff --git a/package.json b/package.json index d66e8ff..4298f79 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "marker", "private": true, "author": "Savin Angel-Mario (savin@fructo.land)", - "version": "1.2.2", + "version": "1.2.3", "type": "module", "scripts": { "dev": "vite", diff --git a/src/lib/file.ts b/src/lib/file.ts index 9f9df17..b09fff0 100644 --- a/src/lib/file.ts +++ b/src/lib/file.ts @@ -47,7 +47,7 @@ export async function setEditorText(editor: monaco.editor.IStandaloneCodeEditor, monaco.editor.getModels().forEach((model) => model.dispose()); editor.setModel(monaco.editor.createModel(await file.text(), fileTypes.get(ext), monaco.Uri.file(file.name))); - + fileAvailableContext.set(true); store.set("fileHandle", fileHandle); } @@ -155,6 +155,8 @@ export function initLaunchWithFile(editor: monaco.editor.IStandaloneCodeEditor, export const fileTypes = new Map([ ["txt", "plaintext"], + ["sh", "shell"], + ["bash", "shell"], ["c", "c"], ["cpp", "cpp"], ["py", "python"], @@ -170,6 +172,7 @@ export const fileTypes = new Map([ export const fileMimeTypes = new Map([ ["txt", "text/plain"], + ["sh", "text/x-shellscript"], ["c", "text/x-c"], ["py", "text/x-python"], ["md", "text/markdown"], @@ -179,4 +182,4 @@ export const fileMimeTypes = new Map([ ["webmanifest", "application/manifest+json"], ["js", "text/javascript"], ["ts", "text/x-typescript"] -]) \ No newline at end of file +]) diff --git a/src/lib/monaco.ts b/src/lib/monaco.ts index b697b64..ee348e6 100644 --- a/src/lib/monaco.ts +++ b/src/lib/monaco.ts @@ -23,7 +23,8 @@ import "monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution" import "monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution"; import "monaco-editor/esm/vs/basic-languages/python/python.contribution"; import "monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution"; +import "monaco-editor/esm/vs/basic-languages/shell/shell.contribution"; import * as monaco from "monaco-editor/esm/vs/editor/editor.api"; -export default monaco; \ No newline at end of file +export default monaco;