UNPKG

@plugjs/plug

Version:
23 lines (22 loc) 866 B
// plugs/debug.ts import { $gry, $und, $ylw } from "../logging.mjs"; import { install } from "../pipe.mjs"; install("debug", class Debug { _title; constructor(...args) { const [title = "Debugging"] = args; this._title = title; } async pipe(files, context) { context.log.notice(this._title, `${$gry("(")}${$ylw(files.length)} ${$gry("files)")}`); context.log.notice("- build file dir:", $gry($und(context.resolve("@")))); context.log.notice("- current dir:", $gry($und(context.resolve(".")))); context.log.notice("- files dir:", $gry($und(files.directory))); const paths = [...files]; const path = paths.shift(); context.log.notice("- relative paths:", $und($gry(path))); paths.forEach((p) => context.log.notice("- :", $und($gry(p)))); return files; } }); //# sourceMappingURL=debug.mjs.map