[WEB-561] refactor: editor build config (#7442)
* refactor: editor build config * fix: type errors
This commit is contained in:
parent
df4ea1f7ac
commit
d5eb374217
4 changed files with 7 additions and 2 deletions
|
|
@ -22,7 +22,7 @@
|
|||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup --minify",
|
||||
"build": "tsc && tsup --minify",
|
||||
"dev": "tsup --watch",
|
||||
"check:lint": "eslint . --max-warnings 0",
|
||||
"check:types": "tsc --noEmit",
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ function scrollToNode(editor: Editor, pos: number): void {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
export function scrollToNodeViaDOMCoordinates(editor: Editor, pos: number, behavior?: ScrollBehavior): void {
|
||||
const view = editor.view;
|
||||
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ export interface EditorRefApi extends EditorReadOnlyRefApi {
|
|||
onDocumentInfoChange: (callback: (documentInfo: TDocumentInfo) => void) => () => void;
|
||||
onHeadingChange: (callback: (headings: IMarking[]) => void) => () => void;
|
||||
onStateChange: (callback: () => void) => () => void;
|
||||
// eslint-disable-next-line no-undef
|
||||
scrollToNodeViaDOMCoordinates: (behavior?: ScrollBehavior, position?: number) => void;
|
||||
setEditorValueAtCursorPosition: (content: string) => void;
|
||||
setFocusAtPosition: (position: number) => void;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@
|
|||
"lib": ["ES2022", "DOM"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"target": "ESNext",
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"target": "ESNext",
|
||||
"types": ["node"],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/core/*"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue