- deal-dashboard: Overview stats, won/lost ratio, revenue forecast - deal-detail: Full deal with products, activities, participants, timeline - deal-grid: Sortable deal list with filters - pipeline-kanban: Drag-drop pipeline board - pipeline-analytics: Conversion rates, velocity, bottleneck analysis - pipeline-funnel: Visual funnel with stage metrics - person-detail: Contact card with deals, activities, files - person-grid: Contact directory with search - org-detail: Organization with people, deals, activities - org-grid: Organization directory - activity-dashboard: Activity calendar/list with completion tracking - activity-calendar: Monthly calendar view - lead-inbox: Lead list with labels and quick actions - product-catalog: Product list with pricing - goal-tracker: Goals with progress bars - revenue-dashboard: Revenue analytics, forecasting - email-inbox: Mail threads with preview - deals-timeline: Timeline of deal progression - search-results: Universal search - won-deals: Closed-won deals celebration view All apps use React with dark theme. Self-contained with inline shared components. Each app has App.tsx, index.html, and vite.config.ts. Ports 3000-3019 for dev servers.
52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
import { build } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { fileURLToPath } from 'url';
|
|
import { dirname, join } from 'path';
|
|
import { readdirSync, statSync } from 'fs';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
const rootDir = join(__dirname, '..');
|
|
const appsDir = join(rootDir, 'src/ui/react-app');
|
|
const outDir = join(rootDir, 'dist/apps');
|
|
|
|
async function buildApp(appName) {
|
|
console.log(`Building ${appName}...`);
|
|
|
|
await build({
|
|
root: join(appsDir, appName),
|
|
plugins: [react()],
|
|
build: {
|
|
outDir: join(outDir, appName),
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
input: join(appsDir, appName, 'index.html'),
|
|
},
|
|
},
|
|
});
|
|
|
|
console.log(`✓ Built ${appName}`);
|
|
}
|
|
|
|
async function main() {
|
|
try {
|
|
const apps = readdirSync(appsDir).filter(name => {
|
|
const path = join(appsDir, name);
|
|
return statSync(path).isDirectory();
|
|
});
|
|
|
|
console.log(`Found ${apps.length} apps to build`);
|
|
|
|
for (const app of apps) {
|
|
await buildApp(app);
|
|
}
|
|
|
|
console.log(`\n✓ Successfully built all ${apps.length} apps`);
|
|
} catch (error) {
|
|
console.error('Build failed:', error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
main();
|