-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use file system isolate sfc file
- Loading branch information
1 parent
9ca1f08
commit 6223a4e
Showing
12 changed files
with
359 additions
and
216 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import * as vue from 'vue'; | ||
|
||
declare function compileModules(filename: string): Promise<Array<string>>; | ||
|
||
declare const APP_FILE = "App.vue"; | ||
declare const MAIN_FILE = "main.js"; | ||
declare const WELCOME_CODE: string; | ||
declare const MAIN_CODE: string; | ||
declare class File { | ||
filename: string; | ||
code: string; | ||
compiled: { | ||
js: string; | ||
css: string; | ||
ssr: string; | ||
}; | ||
constructor(filename: string, code?: string); | ||
} | ||
interface Store { | ||
files: Record<string, File>; | ||
activeFilename: string; | ||
readonly activeFile: File; | ||
readonly importMap: string | undefined; | ||
errors: (string | Error)[]; | ||
} | ||
declare const store: Store; | ||
declare const activeFilename: vue.ComputedRef<string>; | ||
declare const mainCode: vue.ComputedRef<string>; | ||
declare const encodeFiles: () => string; | ||
declare function exportFiles(): Record<string, string>; | ||
declare function setActive(filename: string, code: string): void; | ||
declare function addFile(filename: string, code: string): void; | ||
declare function changeFile(filename: string, code: string): void; | ||
declare function deleteFile(filename: string): void; | ||
|
||
declare const COMP_IDENTIFIER = "__sfc__"; | ||
declare function compileFile({ filename, code, compiled }: File): Promise<void>; | ||
|
||
export { APP_FILE, COMP_IDENTIFIER, File, MAIN_CODE, MAIN_FILE, Store, WELCOME_CODE, activeFilename, addFile, changeFile, compileFile, compileModules, deleteFile, encodeFiles, exportFiles, mainCode, setActive, store }; |
Oops, something went wrong.