char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
7f4058a
main
1import { runTasks , type TaskReport } from "avril:task" ; 2 3const report :TaskReport = await runTasks ({ 4page :{ 5command :[ "avril" , "run" , "render.ts" , "a b.md" ], 6files :"content/**" , 7output :[ "dist/a.html" ], 8}, 9feed :{ 10run :async ( ctx ) => { 11const root :string = ctx . root ; 12void root ; 13}, 14dependencies :[ "page" ], 15}, 16all :{ dependencies :[ "page" , "feed" ], parallel :true }, 17}, { target :"all" , watch :false }); 18 19const ok :boolean = report . ok ; 20const code :number = report . code ; 21const checked :void = report . throwIfFailed (); 22void ok ; 23void code ; 24void checked ; 25 26// @ts-expect-error run must be a function. 27await runTasks ({ bad :{ run :"true" } }); 28// @ts-expect-error Task definitions are objects, not strings. 29await runTasks ({ bad :"true" }); 30// @ts-expect-error files is a string or string array, not a number. 31await runTasks ({ bad :{ command :"true" , files :3 } });