open-index/open-npm huggingface dataset:
npm package: @jackfranklin/rollup-plugin-import-glob
Description: Import a glob of files using Rollup
Author: Jack Franklin
Latest version: 0.1.0

# rollup-plugin-import-glob

[![CircleCI](https://circleci.com/gh/jackfranklin/rollup-plugin-import-glob.svg?style=svg)](https://circleci.com/gh/jackfranklin/rollup-plugin-import-glob)

A Rollup plugin to import a glob of files. When a matching import is found a new JS file is created that contains all the imports of any files matching the glob.

## Install

```
npm install --save-dev @jackfranklin/rollup-plugin-import-glob

yarn add --dev @jackfranklin/rollup-plugin-import-glob
```

## Example usage

The plugin looks for imports that start with `glob:` and are followed by a regex.

Each matched import is a named export in the form `fileX`, where `X` starts at 0:

```js
import * as posts from 'glob:./posts/*.js'

// posts will look like so:

{
  file0: {
    default: ...,
    // and any named exports
  },
  file1: {
    default: ...,
    // and any named exports
  },
  /// and so on for as many files as were found
}
```

## Rollup configuration

```js
import importGlob from '@jackfranklin/rollup-plugin-import-glob'

export default {
  input: 'your-app.js',
  plugins: [importGlob()],
}
```

There are currently no configuration options available for the plugin.
npm package: @jackfranklin/rollup-plugin-markdown
Description: Parse markdown files and import them with Rollup
Author: Jack Franklin
Latest version: 0.4.0

# rollup-plugin-markdown

[![CircleCI](https://circleci.com/gh/jackfranklin/rollup-plugin-markdown.svg?style=svg)](https://circleci.com/gh/jackfranklin/rollup-plugin-markdown)

A Rollup plugin to parse Markdown files. The parsed Markdown can either be imported as a JavaScript module, or piped through the Rollup build process.

- [Showdown][showdown] is used to parse a Markdown file.
- [Gray Matter][gray-matter] is used to parse front-matter from a Markdown file.

## Install

```text
npm install --save-dev @jackfranklin/rollup-plugin-markdown

yarn add --dev @jackfranklin/rollup-plugin-markdown
```

## Example module output

```js
import blogPost from './src/blog-post.md'

// from this import you get:
blogPost.html // the parsed HTML
blogPost.metadata // a JS object of the front-matter
blogPost.filename // blog-post.md - the filename that was imported
blogPost.path // ./src/blog-post.md - the path to the file that was imported
```

## Rollup configuration

```js
import markdown from '@jackfranklin/rollup-plugin-markdown'

export default {
  input: 'your-app.js',
  plugins: [
    markdown({
      include?: 'src/md/*.md',
      exclude?: 'README.md',
      showdownOptions?: '',
      showdownExtensions?: '',
      allowImports?: true,
      parseFrontMatterAsMarkdown?: false
    })
  ],
}
```

You can pass in six options:

- `include` and `exclude`, which are globs to limit which file(s) the plugin is applied to.
- `showdownOptions`, which are options to pass to the Showdown converter.
- `showdownExtensions`, which is an array of Showdown extensions.
- `allowImports`, a flag to tell the plugin whether or not to export the Markdown files as JavaScript modules.
- `parseFrontMatterAsMarkdown`, a flag that converts front-matter values into inline HTML (without enclosing `<p>/<p>` tags).

The plugin will only parse `.md` files.

[showdown]: https://github.com/showdownjs/showdown
[gray-matter]: https://github.com/jonschlinkert/gray-matter

## Changelog

#### 0.4.0 [4th July 2022]

- [Add TypeScript definitions](https://github.com/jackfranklin/rollup-plugin-markdown/pull/17) - thanks @tommy-mitchell for the PR.
- [Add options for parsing front matter and piping through Rollup](https://github.com/jackfranklin/rollup-plugin-markdown/pull/16) - thanks @tommy-mitchell for the PR.

#### 0.3.0 [13th Jan 2021]

- Allow Showdown options and extensions to be registered. Thanks to @mattfran and @arnorhs for their contributions.

#### 0.2.0

- expose full path to Markdown file as `.path` from the import.

#### 0.1.0

- Initial release