• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// To aid in future maintenance, this layout closely matches remark-cli/cli.js.
2// https://github.com/remarkjs/remark/blob/HEAD/packages/remark-cli/cli.js
3
4import { args } from 'unified-args';
5import extensions from 'markdown-extensions';
6import { remark } from 'remark';
7import proc from 'remark/package.json';
8import cli from '../package.json';
9import lintNode from 'remark-preset-lint-node';
10import gfm from 'remark-gfm';
11
12args({
13  processor: remark().use(gfm).use(lintNode),
14  name: proc.name,
15  description: cli.description,
16  version: [
17    proc.name + ': ' + proc.version,
18    cli.name + ': ' + cli.version,
19  ].join(', '),
20  pluginPrefix: proc.name,
21  presetPrefix: proc.name + '-preset',
22  packageField: proc.name + 'Config',
23  rcName: '.' + proc.name + 'rc',
24  ignoreName: '.' + proc.name + 'ignore',
25  extensions: extensions,
26  detectConfig: false,
27});
28