Shared services for Minimact Swig (Electron GUI and CLI)
npm install @minimact/swig-sharedtypescript
import { ProjectManager, TranspilerService, FileWatcher } from '@minimact/swig-shared';
// Create a new project
const projectManager = new ProjectManager('/path/to/userdata');
const project = await projectManager.createProject('/path/to/project', 'Counter');
// Transpile TSX to C#
const transpiler = new TranspilerService();
const result = await transpiler.transpileFile('/path/to/Component.tsx');
// Watch for file changes
const watcher = new FileWatcher();
watcher.watch('/path/to/project', (filePath) => {
console.log('File changed:', filePath);
transpiler.transpileFile(filePath);
});
`
Used By
- minimact-swig-electron - Electron GUI for Minimact development
- @minimact/swig - CLI tool for Minimact (npx @minimact/swig`)