Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gas-report): create package, move relevant files to it #1147

Merged
merged 11 commits into from
Jul 12, 2023
Prev Previous commit
Next Next commit
make gas-report a default command for mud-gas-report
dk1a committed Jul 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 41f8ae115f37eec27f85a0dd6d5d7988903c942b
6 changes: 5 additions & 1 deletion packages/gas-reporter/ts/mud-gas-report.ts
Original file line number Diff line number Diff line change
@@ -9,8 +9,12 @@ import * as dotenv from "dotenv";
import chalk from "chalk";
dotenv.config();

// $0 makes this a default command (as opposed to a sub-command),
// which replaces `mud-gas-report gas-report` with just `mud-gas-report`
gasReport.command = "$0";

yargs(hideBin(process.argv))
.scriptName("gas-report")
.scriptName("mud-gas-report")
// Use the commands directory to scaffold
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- command array overload isn't typed, see https://github.com/yargs/yargs/blob/main/docs/advanced.md#esm-hierarchy
.command(gasReport as any)