From b8790a6ad08475d336ec7098f1bdd4e9205f6030 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 6 Jul 2021 11:15:49 +0200 Subject: [PATCH] Update prose in `readme.md` --- readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index a7b3b67..2444822 100644 --- a/readme.md +++ b/readme.md @@ -34,17 +34,17 @@ Say we have the following file, `example.md`: And our script, `example.js`, looks as follows: ```js -var vfile = require('to-vfile') -var report = require('vfile-reporter') -var remark = require('remark') -var control = require('unified-message-control') -var mdastMarker = require('mdast-comment-marker') +import {toVFile} from 'to-vfile' +import {reporter} from 'vfile-reporter' +import {remark} from 'remark' +import {messageControl} from 'unified-message-control' +import {commentMarker} from 'mdast-comment-marker' remark() .use(warn) - .use(control, {name: 'foo', marker: mdastMarker, test: 'html'}) - .process(vfile.readSync('example.md'), function (err, file) { - console.error(report(err || file)) + .use(messageControl, {name: 'foo', marker: commentMarker, test: 'html'}) + .process(toVFile.readSync('example.md'), function (err, file) { + console.error(reporter(err || file)) }) function warn() { @@ -65,11 +65,11 @@ example.md: no issues found This package exports the following identifiers: `messageControl`. There is no default export. -### `unified.use(control, options)` +### `unified().use(messageControl, options)` Let comment markers control messages from certain sources. -##### Options +##### `options` ###### `options.name`