Skip to content

Commit 5415c51

Browse files
committed
Migrate ValidateBundleCommand from cliffy to clipanion
1 parent 0b191fc commit 5415c51

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

package/src/common/validate-bundle.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/*
22
* prepare-dist.ts
33
*
4-
* Copyright (C) 2020-2022 Posit Software, PBC
4+
* Copyright (C) 2020-2024 Posit Software, PBC
55
*
66
*/
7-
8-
97
import { join } from "../../../src/deno_ral/path.ts";
108
import { info } from "../../../src/deno_ral/log.ts";
11-
import { Configuration } from "../common/config.ts";
9+
import { Configuration } from "./config.ts";
1210
import { execProcess } from "../../../src/core/process.ts";
11+
import { PackageCommand } from "../cmd/pkg-cmd.ts";
12+
import { Command } from "npm:clipanion";
1313

1414
export async function validateBundle(
1515
config: Configuration,
@@ -69,3 +69,16 @@ export async function validateBundle(
6969

7070
}
7171
}
72+
73+
export class ValidateBundleCommand extends PackageCommand {
74+
static paths = [["validate-bundle"]];
75+
76+
static usage = Command.Usage({
77+
description: "Validate a JS bundle built using prepare-dist",
78+
});
79+
80+
async execute() {
81+
await super.execute();
82+
await validateBundle(this.config)
83+
}
84+
}

0 commit comments

Comments
 (0)