@orieljs/console
v0.1.0-alpha.10
Published
The Oriel Console component.
Readme
@orieljs/console
The Oriel console: the oriel command line, command classes and closure commands with Laravel's signature syntax, the generators (make:model, make:controller and the others) and the task scheduler. It follows Laravel's Artisan. Console is part of @orieljs/framework, which every Oriel app already installs, and is re-exported from it. In an app, import it from @orieljs/framework; @orieljs/console is also published on its own.
npm install @orieljs/frameworkimport { Artisan, Schedule } from '@orieljs/framework'
import type { CommandContext } from '@orieljs/framework/contracts'
import { Post } from '../app/Models/Post'
Artisan.command('posts:count', async function (this: CommandContext) {
this.info(`${await Post.count()} posts`)
}).purpose('Show how many posts there are')
Schedule.command('posts:count').dailyAt('08:00')Artisan.command() registers a closure command, and a class that extends Command with a signature and a handle() method is found in app/Console/Commands. Schedule runs commands, jobs and callbacks on a timetable through schedule:run or schedule:work.
Documentation: https://orieljs.vercel.app/docs/console
Status: early alpha. APIs will change.
License
Oriel is open-source software licensed under the Apache License 2.0 (Apache-2.0; see LICENSE and NOTICE). The Oriel name and logo are trademarks; see TRADEMARKS.md.
Website: https://orieljs.vercel.app
