From ca70dd860082197d0440d9efc41dac28c2424fdb Mon Sep 17 00:00:00 2001 From: ThinLiquid Date: Tue, 17 Oct 2023 00:18:24 +0100 Subject: [PATCH] =?UTF-8?q?[=F0=9F=8E=A8]=20Added=20filer=20to=20bundle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1 - src/apps/editor.ts | 4 +++- src/apps/files.ts | 3 ++- src/filer.d.ts | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 src/filer.d.ts diff --git a/index.html b/index.html index 6360138..685a6a4 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,6 @@ Flow OS - \ No newline at end of file diff --git a/src/apps/editor.ts b/src/apps/editor.ts index 3a7c424..69cbd02 100644 --- a/src/apps/editor.ts +++ b/src/apps/editor.ts @@ -11,6 +11,8 @@ import 'prismjs/components/prism-typescript.js' import 'prismjs/components/prism-css.js' import { FlowWindow } from '../wm.ts' +import Filer from 'filer' + interface EditorConfig { path: string } @@ -22,7 +24,7 @@ export default class EditorApp implements App { version = '1.0.0' async open (data?: EditorConfig): Promise { - const fs = new (window as any).Filer.FileSystem() + const fs = new Filer.FileSystem() const win = (window as any).wm.createWindow({ title: this.name, diff --git a/src/apps/files.ts b/src/apps/files.ts index 25c188b..2c49ad0 100644 --- a/src/apps/files.ts +++ b/src/apps/files.ts @@ -4,6 +4,7 @@ import { App } from '../types.ts' import flow from '../flow.ts' import { FlowWindow } from '../wm.ts' +import Filer from 'filer' import { Stats } from 'fs' export default class FilesApp implements App { @@ -13,7 +14,7 @@ export default class FilesApp implements App { version = '1.0.0' async open (): Promise { - const fs = new (window as any).Filer.FileSystem() + const fs = new Filer.FileSystem() const win = (window as any).wm.createWindow({ title: this.name, diff --git a/src/filer.d.ts b/src/filer.d.ts new file mode 100644 index 0000000..4848cf7 --- /dev/null +++ b/src/filer.d.ts @@ -0,0 +1 @@ +declare module 'filer'