Files
insertr/lib/rollup.config.js
Joakim d0ac3088b4 refactor: consolidate database structure and move injector to engine
Database Structure Cleanup:
- Move all SQL files from ./db/ to ./internal/db/
- Update sqlc.yaml to use new paths (preserving schema+setup.sql hack)
- Consolidate database-related code in single directory
- Remove empty ./db/ directory

Injector Migration:
- Move injector.go from content package to engine package
- Update ContentClient interface to return map instead of slice for GetBulkContent
- Update database client implementation to match interface
- Remove injector dependency from enhancer (stub implementation)

Demo-Site Consolidation:
- Move demo-site to test-sites/demo-site for better organization
- Update build scripts to use new demo-site location
- Maintain all functionality while improving project structure

This continues the unified architecture consolidation by moving core content
processing logic to the engine and organizing related files properly.
2025-09-16 15:39:25 +02:00

47 lines
1.0 KiB
JavaScript

import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import { execSync } from 'child_process';
// Simple copy plugin to auto-copy to demo-site during development
function copyToDemo() {
return {
name: 'copy-to-demo',
writeBundle() {
try {
execSync('cp dist/insertr.js ../test-sites/demo-site/insertr.js');
console.log('📄 Copied to test-sites/demo-site/insertr.js');
} catch (error) {
console.warn('⚠️ Failed to copy to test-sites/demo-site:', error.message);
}
}
};
}
export default [
// Development build
{
input: 'src/index.js',
output: {
file: 'dist/insertr.js',
format: 'iife',
name: 'Insertr'
},
plugins: [
nodeResolve(),
copyToDemo()
]
},
// Production build (minified)
{
input: 'src/index.js',
output: {
file: 'dist/insertr.min.js',
format: 'iife',
name: 'Insertr'
},
plugins: [
nodeResolve(),
terser()
]
}
];