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});