Apply when setting up the development environment, running dev server, building, testing, or deploying the extension. Covers npm commands, CORS configuration, debugging, and deployment to ChurchTools.
npx playbooks add skill bwl21/bwl-flyer-generator --skill development-workflow
.env-example to .env VITE_KEY=your-extension-key
VITE_CHURCHTOOLS_URL=https://your-instance.church.tools
npm run dev # Start dev server with hot-reload (port 5173)
npm run build # Production build
npm run preview # Preview production build
npm run deploy # Build and package for ChurchTools
npm run prettier:write # Format code
For local development, configure CORS in ChurchTools:
http://localhost:5173Safari has stricter cookie handling. Solutions:
npm run devnpm run buildnpm run deploynpm run prettier:writenpm run buildnpm run deploy.zip to ChurchTools Admin > ExtensionsBrowser console tests:
// Test API connection
churchtoolsClient.get('/whoami').then(console.log).catch(console.error)
// Check extension context
console.log('Extension context:', {
url: window.location.href,
parent: window.parent !== window,
churchtoolsClient: !!window.churchtoolsClient
})
Check build output:
ls -la dist/
ls -lh dist/assets/
window.parent.postMessage for communication with ChurchToolschurchtoolsClientWeekly roundup of top Claude Code skills, MCP servers, and AI coding tips.