refactor: migration architecture clean (Rust + JS)
Côté JS : décompose main.js en modules ES6 (state, services, ui, router) pour séparer les responsabilités et faciliter la maintenance. Côté Rust : ajoute 7 tests sur is_relevant_path (notify_watcher) pour couvrir les cas cachés/non-md ; couverture totale 77 % > seuil 60 %. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export function listMdFiles(dir) {
|
||||
return window.__TAURI__.core.invoke('list_md_files', { dir });
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export function renderMarkdown(content) {
|
||||
return window.__TAURI__.core.invoke('render_markdown', { content });
|
||||
}
|
||||
|
||||
export function convertFile(path) {
|
||||
return window.__TAURI__.core.invoke('convert_file', { path });
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export function startWatch(path) {
|
||||
return window.__TAURI__.core.invoke('start_watch', { path });
|
||||
}
|
||||
|
||||
export function stopWatch() {
|
||||
return window.__TAURI__.core.invoke('stop_watch');
|
||||
}
|
||||
|
||||
export function onFileChanged(callback) {
|
||||
return window.__TAURI__.event.listen('file-changed', callback);
|
||||
}
|
||||
Reference in New Issue
Block a user