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

remark-yaml-config

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-yaml-config - npm Package Compare versions

Comparing version 4.0.3 to 4.1.0

10

index.js

@@ -7,3 +7,5 @@ 'use strict'

/* Modify remark to read configuration from comments. */
var origin = 'remark-yaml-config:invalid-options'
// Modify remark to read configuration from comments.
function yamlConfig() {

@@ -24,3 +26,3 @@ var Parser = this.Parser

/* Wrapper factory. */
// Wrapper factory.
function factory(original) {

@@ -31,3 +33,3 @@ replacement.locator = original.locator

/* Replacer for tokeniser or visitor. */
// Replacer for tokeniser or visitor.
function replacement(node) {

@@ -47,3 +49,3 @@ var self = this

} catch (error) {
self.file.fail(error.message, marker)
self.file.fail(error.message, marker, origin)
}

@@ -50,0 +52,0 @@

23

package.json
{
"name": "remark-yaml-config",
"version": "4.0.3",
"description": "Configure remark with YAML front-matter",
"version": "4.1.0",
"description": "remark plugin to configure it with YAML frontmatter",
"license": "MIT",
"keywords": [
"unified",
"remark",
"plugin",
"mdast",
"markdown",
"yaml",
"frontmatter",
"options",
"config",
"settings",
"remark"
"settings"
],

@@ -27,4 +32,4 @@ "repository": "remarkjs/remark-yaml-config",

"browserify": "^16.0.0",
"nyc": "^13.0.0",
"prettier": "^1.14.2",
"nyc": "^14.0.0",
"prettier": "^1.0.0",
"remark": "^10.0.0",

@@ -34,7 +39,7 @@ "remark-cli": "^6.0.0",

"remark-html": "^9.0.0",
"remark-preset-wooorm": "^4.0.0",
"remark-preset-wooorm": "^5.0.0",
"tape": "^4.0.0",
"tinyify": "^2.4.3",
"tinyify": "^2.0.0",
"unified": "^7.0.0",
"xo": "^0.23.0"
"xo": "^0.24.0"
},

@@ -41,0 +46,0 @@ "scripts": {

@@ -6,18 +6,19 @@ # remark-yaml-config

[![Downloads][downloads-badge]][downloads]
[![Chat][chat-badge]][chat]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
Configure [**remark**][remark] with YAML front-matter. This requires
[`remark-frontmatter`][remark-frontmatter] as well.
[**remark**][remark] plugin to configure it with YAML frontmatter.
This requires [`remark-frontmatter`][remark-frontmatter] as well.
## Installation
## Install
[npm][]:
```bash
```sh
npm install remark-yaml-config
```
## Usage
## Use

@@ -40,3 +41,3 @@ Say we have the following file, `example.md`:

```javascript
```js
var vfile = require('to-vfile')

@@ -72,6 +73,7 @@ var remark = require('remark')

### `remark.use(yamlConfig)`
### `remark().use(yamlConfig)`
Passes the configuration at the `remark` field as [parse][parse-settings]
and [stringify][stringify-settings] settings to **remark**.
Plugin to configure it with YAML frontmatter.
Takes the `'remark'` field in the frontmatter and passes it as configuration to
[parse][parse-settings] and [stringify][stringify-settings].

@@ -90,7 +92,9 @@ Just like [`remark-comment-config`][remark-comment-config], but YAML is

See [`contributing.md` in `remarkjs/remark`][contributing] for ways to get
started.
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This organisation has a [Code of Conduct][coc]. By interacting with this
repository, organisation, or community you agree to abide by its terms.
This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.

@@ -103,3 +107,3 @@ ## License

[build-badge]: https://img.shields.io/travis/remarkjs/remark-yaml-config.svg
[build-badge]: https://img.shields.io/travis/remarkjs/remark-yaml-config/master.svg

@@ -116,5 +120,5 @@ [build]: https://travis-ci.org/remarkjs/remark-yaml-config

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-yaml-config.svg
[chat]: https://spectrum.chat/unified/remark
[size]: https://bundlephobia.com/result?p=remark-yaml-config

@@ -127,2 +131,16 @@ [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[chat]: https://spectrum.chat/unified/remark
[npm]: https://docs.npmjs.com/cli/install
[health]: https://github.com/remarkjs/.github
[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md
[support]: https://github.com/remarkjs/.github/blob/master/support.md
[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md
[license]: license

@@ -132,4 +150,2 @@

[npm]: https://docs.npmjs.com/cli/install
[remark]: https://github.com/remarkjs/remark

@@ -144,5 +160,1 @@

[remark-frontmatter]: https://github.com/remarkjs/remark-frontmatter
[contributing]: https://github.com/remarkjs/remark/blob/master/contributing.md
[coc]: https://github.com/remarkjs/remark/blob/master/code-of-conduct.md
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