- Create BaseModulePlugin class to eliminate boilerplate across modules - Provide standardized service registration, component registration, and event setup - Implement declarative configuration approach with onInstall/onUninstall hooks - Add automatic logging with consistent emoji patterns and error handling - Refactor nostr-feed and events modules to demonstrate pattern (~47% code reduction) - Maintain full TypeScript compatibility and backward compatibility - All modules now follow identical registration patterns for better maintainability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
No EOL
541 B
TypeScript
27 lines
No EOL
541 B
TypeScript
import { createModulePlugin } from '@/core/base/BaseModulePlugin'
|
|
import NostrFeed from './components/NostrFeed.vue'
|
|
import { useFeed } from './composables/useFeed'
|
|
|
|
/**
|
|
* Nostr Feed Module Plugin
|
|
* Provides social feed functionality with admin announcements support
|
|
*/
|
|
export const nostrFeedModule = createModulePlugin({
|
|
name: 'nostr-feed',
|
|
version: '1.0.0',
|
|
dependencies: ['base'],
|
|
|
|
components: {
|
|
NostrFeed
|
|
},
|
|
|
|
routes: [],
|
|
|
|
exports: {
|
|
composables: {
|
|
useFeed
|
|
}
|
|
}
|
|
})
|
|
|
|
export default nostrFeedModule |