File tree 3 files changed +24
-25
lines changed
v-next/hardhat/src/internal
3 files changed +24
-25
lines changed Original file line number Diff line number Diff line change
1
+ export const BUILTIN_OPTIONS : Array < {
2
+ name : string ;
3
+ description : string ;
4
+ } > = [
5
+ {
6
+ name : "--config" ,
7
+ description : "A Hardhat config file." ,
8
+ } ,
9
+ {
10
+ name : "--help" ,
11
+ description : "Shows this message, or a task's help if its name is provided" ,
12
+ } ,
13
+ {
14
+ name : "--show-stack-traces" ,
15
+ description : "Show stack traces (always enabled on CI servers)." ,
16
+ } ,
17
+ {
18
+ name : "--version" ,
19
+ description : "Shows hardhat's version." ,
20
+ } ,
21
+ ] ;
Original file line number Diff line number Diff line change 1
1
import type { Task } from "@ignored/hardhat-vnext-core/types/tasks" ;
2
2
3
+ import { BUILTIN_OPTIONS } from "../../builtin-options.js" ;
3
4
import { getHardhatVersion } from "../../utils/package.js" ;
4
5
5
6
import {
6
7
GLOBAL_NAME_PADDING ,
7
- GLOBAL_OPTIONS ,
8
8
getLongestNameLength ,
9
9
getSection ,
10
10
parseTasks ,
@@ -18,7 +18,7 @@ export async function getGlobalHelpString(
18
18
const { tasks, subtasks } = parseTasks ( rootTasks ) ;
19
19
20
20
const namePadding =
21
- getLongestNameLength ( [ ...tasks , ...subtasks , ...GLOBAL_OPTIONS ] ) +
21
+ getLongestNameLength ( [ ...tasks , ...subtasks , ...BUILTIN_OPTIONS ] ) +
22
22
GLOBAL_NAME_PADDING ;
23
23
24
24
let output = `Hardhat version ${ version }
@@ -34,7 +34,7 @@ Usage: hardhat [GLOBAL OPTIONS] <TASK> [SUBTASK] [TASK OPTIONS] [--] [TASK ARGUM
34
34
output += getSection ( "AVAILABLE SUBTASKS" , subtasks , namePadding ) ;
35
35
}
36
36
37
- output += getSection ( "GLOBAL OPTIONS" , GLOBAL_OPTIONS , namePadding ) ;
37
+ output += getSection ( "GLOBAL OPTIONS" , BUILTIN_OPTIONS , namePadding ) ;
38
38
39
39
output += `\nTo get help for a specific task run: npx hardhat <TASK> [SUBTASK] --help` ;
40
40
Original file line number Diff line number Diff line change 1
1
import type { ParameterType } from "@ignored/hardhat-vnext-core/config" ;
2
2
import type { Task } from "@ignored/hardhat-vnext-core/types/tasks" ;
3
3
4
- export const GLOBAL_OPTIONS : Array < {
5
- name : string ;
6
- description : string ;
7
- } > = [
8
- {
9
- name : "--config" ,
10
- description : "A Hardhat config file." ,
11
- } ,
12
- {
13
- name : "--help" ,
14
- description : "Shows this message, or a task's help if its name is provided" ,
15
- } ,
16
- {
17
- name : "--show-stack-traces" ,
18
- description : "Show stack traces (always enabled on CI servers)." ,
19
- } ,
20
- {
21
- name : "--version" ,
22
- description : "Shows hardhat's version." ,
23
- } ,
24
- ] ;
25
-
26
4
export const GLOBAL_NAME_PADDING = 6 ;
27
5
28
6
export function parseTasks ( taskMap : Map < string , Task > ) : {
You can’t perform that action at this time.
0 commit comments