mirror of
https://github.com/smogon/sprites.git
synced 2026-09-27 03:37:30 -05:00
deploy: add ActionQueue::print
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user