Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-usage

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-usage - npm Package Compare versions

Comparing version 4.0.0-alpha.1 to 4.0.0

6

history.md

@@ -5,2 +5,8 @@ <!--remark setext-->

4.0.0 / 2016-06-13
==================
* Update `readme.md` ([`b0d84c7`](https://github.com/wooorm/remark-usage/commit/b0d84c7))
* Update for changes in remark@5.0.0 ([`27e38e6`](https://github.com/wooorm/remark-usage/commit/27e38e6))
3.0.0 / 2016-02-14

@@ -7,0 +13,0 @@ ==================

10

package.json
{
"name": "remark-usage",
"version": "4.0.0-alpha.1",
"version": "4.0.0",
"description": "Add a usage example to your README",

@@ -38,7 +38,7 @@ "license": "MIT",

"remark-cli": "^1.0.0",
"remark-comment-config": "^4.0.0-alpha.1",
"remark-github": "^4.0.1",
"remark-comment-config": "^4.0.0",
"remark-github": "^5.0.0",
"remark-lint": "^4.0.0",
"remark-slug": "^4.1.0",
"remark-validate-links": "^4.0.0-alpha.1",
"remark-slug": "^4.1.1",
"remark-validate-links": "^4.0.0",
"tape": "^4.0.0"

@@ -45,0 +45,0 @@ },

@@ -1,8 +0,10 @@

# remark-usage [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
# remark-usage [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
Add a [usage][] example to a README.
<!--lint disable heading-increment list-item-spacing-->
Add a [usage][] example to a README with [**remark**][remark].
## Installation
[npm][npm-install]:
[npm][]:

@@ -23,3 +25,3 @@ ```bash

var fs = require('fs');
var remark = require('remark')();
var remark = require('remark');
var usage = require('remark-usage'); // This is changed from `./index.js` to `remark-usage`

@@ -32,3 +34,3 @@ ```

var readme = fs.readFileSync('readme.md', 'utf-8');
var ast = remark.use(usage).parse(readme);
var ast = remark().use(usage).parse(readme);
```

@@ -39,3 +41,3 @@

```markdown
Add a [usage][] example to a README.
Add a [usage][] example to a README with [**remark**][remark].
```

@@ -73,3 +75,3 @@

The example is run as JavaScript. Line comments are parsed as Markdown.
The example is run as JavaScript. Line comments are parsed as Markdown.
Calls to `console.log()` are exposed as code blocks, containing the logged

@@ -83,21 +85,18 @@ values (optionally with a language flag).

* Make sure no side effects occur when running `example.js`!
* Don’t do weird things. This is mostly regexes!
* Don’t do weird things. This is mostly regexes!
Options:
###### `options`
* `cwd` (`string?`) — Path to a directory containing a node module. Used
to infer `name`, `main`, and `example`;
* `name` (`string?`) — Name of the module. Inferred from `package.json`s
`name` property. Used to rewrite `require('./index.js')` to
* `cwd` (`string?`) — Path to a directory containing a node module.
Used to infer `name`, `main`, and `example`;
* `name` (`string?`) — Name of the module. Inferred from `package.json`s
`name` property. Used to rewrite `require('./index.js')` to
`require('some-name')`;
* `main` (`string?`) — Path to the main script. Resolved from `package.json`s
`main` property (or `index.js`). Used to rewrite `require('./index.js')`
* `main` (`string?`) — Path to the main script. Resolved from
`package.json`s `main` property (or `index.js`). Used to rewrite
`require('./index.js')`
to `require('some-name')`.
* `example` (`string?`) — Path to the example script. **remark-usage** checks
for `docs/example.js`, `doc/example.js`, `examples/index.js`,
* `example` (`string?`) — Path to the example script. **remark-usage**
checks for `docs/example.js`, `doc/example.js`, `examples/index.js`,
`example/index.js`, and `example.js`.
* `heading` (`string?`, default: `"usage"`) — Heading to look for,

@@ -112,12 +111,14 @@ wrapped in `new RegExp('^(' + value + ')$', 'i');`.

[travis-badge]: https://img.shields.io/travis/wooorm/remark-usage.svg
[build-badge]: https://img.shields.io/travis/wooorm/remark-usage.svg
[travis]: https://travis-ci.org/wooorm/remark-usage
[build-status]: https://travis-ci.org/wooorm/remark-usage
[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/remark-usage.svg
[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/remark-usage.svg
[codecov]: https://codecov.io/github/wooorm/remark-usage
[coverage-status]: https://codecov.io/github/wooorm/remark-usage
[npm-install]: https://docs.npmjs.com/cli/install
[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg
[chat]: https://gitter.im/wooorm/remark
[license]: LICENSE

@@ -127,4 +128,8 @@

[npm]: https://docs.npmjs.com/cli/install
[remark]: https://github.com/wooorm/remark
[usage]: #usage
[example-js]: example.js
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc