Development and testing
Development server
Start the development server:
npm run dev
Your widget will be available at http://localhost:9003.
Test HTML page
Create an index.html file for testing:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Acuitas Widget</title>
</head>
<body>
<div id="app">
<h1>Acuitas Widget Test</h1>
<my-acuitas-widget
id="test-widget-001"
name="Test Medical Widget"
></my-acuitas-widget>
</div>
<script type="module">
import { createSamplePluginProps } from '@acuitas/shared';
import './src/index.ts';
// Set up test data
const widget = document.querySelector('my-acuitas-widget');
const props = createSamplePluginProps({
id: 'test-widget-001',
name: 'Test Medical Widget'
});
// Apply properties
Object.assign(widget, props);
</script>
</body>
</html>
Building for production
Build the widget:
npm run build
This creates a dist folder with the built widget ready for deployment.