[🎨] Added filer to bundle

This commit is contained in:
ThinLiquid 2023-10-17 00:18:24 +01:00
parent 930f40d972
commit ca70dd8600
4 changed files with 6 additions and 3 deletions

View file

@ -6,7 +6,6 @@
<title>Flow OS</title> <title>Flow OS</title>
</head> </head>
<body> <body>
<script src="https://unpkg.com/filer"></script>
<script src="./src/index.ts" type="module"></script> <script src="./src/index.ts" type="module"></script>
</body> </body>
</html> </html>

View file

@ -11,6 +11,8 @@ import 'prismjs/components/prism-typescript.js'
import 'prismjs/components/prism-css.js' import 'prismjs/components/prism-css.js'
import { FlowWindow } from '../wm.ts' import { FlowWindow } from '../wm.ts'
import Filer from 'filer'
interface EditorConfig { interface EditorConfig {
path: string path: string
} }
@ -22,7 +24,7 @@ export default class EditorApp implements App {
version = '1.0.0' version = '1.0.0'
async open (data?: EditorConfig): Promise<FlowWindow> { async open (data?: EditorConfig): Promise<FlowWindow> {
const fs = new (window as any).Filer.FileSystem() const fs = new Filer.FileSystem()
const win = (window as any).wm.createWindow({ const win = (window as any).wm.createWindow({
title: this.name, title: this.name,

View file

@ -4,6 +4,7 @@ import { App } from '../types.ts'
import flow from '../flow.ts' import flow from '../flow.ts'
import { FlowWindow } from '../wm.ts' import { FlowWindow } from '../wm.ts'
import Filer from 'filer'
import { Stats } from 'fs' import { Stats } from 'fs'
export default class FilesApp implements App { export default class FilesApp implements App {
@ -13,7 +14,7 @@ export default class FilesApp implements App {
version = '1.0.0' version = '1.0.0'
async open (): Promise<FlowWindow> { async open (): Promise<FlowWindow> {
const fs = new (window as any).Filer.FileSystem() const fs = new Filer.FileSystem()
const win = (window as any).wm.createWindow({ const win = (window as any).wm.createWindow({
title: this.name, title: this.name,

1
src/filer.d.ts vendored Normal file
View file

@ -0,0 +1 @@
declare module 'filer'