Skip to content

Commit e1857e6

Browse files
committed
fixup!
1 parent babb596 commit e1857e6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/generators/man-page/constants.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
// options are defined.
66
export const DOC_SLUG_OPTIONS = 'options';
77

8+
// This is the filename of the manpage.
9+
// The format is `<command>.1` (Hence, `node.1`)
10+
export const OUTPUT_FILENAME = 'node.1';
11+
812
// https://github.com/nodejs/node/blob/main/doc/api/cli.md#environment-variables-1
913
// This slug should reference the section where the available
1014
// environment variables are defined.

src/generators/man-page/index.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
import { writeFile, readFile } from 'node:fs/promises';
44
import { join } from 'node:path';
55

6-
import { DOC_SLUG_ENVIRONMENT, DOC_SLUG_OPTIONS } from './constants.mjs';
6+
import {
7+
DOC_SLUG_ENVIRONMENT,
8+
DOC_SLUG_OPTIONS,
9+
OUTPUT_FILENAME,
10+
} from './constants.mjs';
711
import {
812
convertOptionToMandoc,
913
convertEnvVarToMandoc,
@@ -77,7 +81,7 @@ export default {
7781
.replace('__ENVIRONMENT__', output.env);
7882

7983
if (options.output) {
80-
await writeFile(join(options.output, 'node.1'), filledTemplate);
84+
await writeFile(join(options.output, OUTPUT_FILENAME), filledTemplate);
8185
}
8286

8387
return filledTemplate;

0 commit comments

Comments
 (0)