// The shipped MATLAB sources, loaded from ../matlab at build time. Browser // only (import.meta.glob is a Vite feature); node tests read the same files // through fs instead. import type { MFile } from './types.ts'; const modules = import.meta.glob('../matlab/*.m', { eager: true, query: '?raw', import: 'default', }) as Record; export const DEFAULT_MFILES: MFile[] = Object.entries(modules) .map(([path, source]) => ({ name: path.split('/').pop()!, source })) .sort((a, b) => a.name.localeCompare(b.name));