From fca3bd0ca308caf6ce45af685a8190b03dc127bf Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Sun, 9 Aug 2020 05:59:21 -0400 Subject: [PATCH] deploy: add ActionQueue::print --- tools/deploy/index.ts | 4 +--- tools/deploy/script.ts | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/deploy/index.ts b/tools/deploy/index.ts index 6c866ff8..c81cce47 100644 --- a/tools/deploy/index.ts +++ b/tools/deploy/index.ts @@ -44,9 +44,7 @@ program if (act) { aq.run('copy'); } else { - for (const {src, dst} of aq.describe()) { - console.log(`${pathlib.format(src)} ==> ${pathlib.format(dst)}`); - } + aq.print(); } }); diff --git a/tools/deploy/script.ts b/tools/deploy/script.ts index 495d9285..794f3d61 100644 --- a/tools/deploy/script.ts +++ b/tools/deploy/script.ts @@ -21,6 +21,12 @@ export class ActionQueue { return this.queue; } + print() { + for (const {src, dst} of this.queue) { + console.log(`${pathlib.format(src)} ==> ${pathlib.format(dst)}`); + } + } + run(mode : 'link' | 'copy') { for (const {src, dst} of this.queue) { fs.mkdirSync(dst.dir, {recursive: true});