UNPKG

@izzyjs/route

Version:

Use your AdonisJs routes in your Inertia.js application

21 lines (20 loc) 689 B
import { BaseCommand } from '@adonisjs/core/ace'; import generateRoutes from '../src/generate_routes.js'; export default class IzzyRoutes extends BaseCommand { static commandName = 'izzy:routes'; static description = 'Generate routes for @izzyjs/route package'; static options = { startApp: true, }; async run() { this.logger.info('Generating routes file... ♻️'); try { await generateRoutes(); this.logger.success('Routes file generated successfully! 🎉'); } catch (error) { this.logger.error('Error generating routes file 🚨'); this.logger.error(error); } } }