open-index/open-npm huggingface dataset:
npm package: @jamen/import-graph
Description: Create import graphs with Graphviz.
Author: Jamen Marz
Latest version: 0.3.0

# @jamen/import-graph

Create import graphs with [Graphviz][2].

![example][1]

## Usage

The easiest way to use it is `npx`:

```
npx @jamen/import-graph src/**.js | dot -T svg > imports.svg
```

The command takes file paths and outputs [DOT][3].

The folloing options may be supplied:

- `-i`, `--ignore <pattern>`: Omit files that match the pattern. Defaults to defaults to `node_modules` and `.git`.
- `-f`, `--from <directory>`: Change where paths in labels are relative from. Defaults to cwd.
- `-o`, `--output <file>`: Outputs to a file instead of stdout.

### What languages are supported?

This tool uses regex patterns to build the graph, making it easy to support many languages with different import syntax, without parsing every language.

The files it supports by default are:

- JavaScript ESM & Commonjs
- TypeScript
- package.json (i.e. `main` and `bin` fields)
- CSS
- SCSS/SASS
- Less.js
- Stylus

[1]: example.svg
[2]: http://graphviz.org/
[3]: https://en.wikipedia.org/wiki/DOT_(graph_description_language)
npm package: @jamen/lorem
Description: Create N bytes of lorem ipsum text.
Author: Jamen Marz
Latest version: 0.2.0

# Lorem ipsum

Create N bytes of lorem ipsum text.

## Install

```
npm install -g @jamen/lorem
```

Or use `npx`

```
npx @jamen/lorem ...
```

## Usage

```sh
$ lorem 10mb > test.txt
$ lorem 100
Lorem ipsum enim incididunt velit amet excepteur adipiscing.
```

Or use the JavaScript interface:

```js
const lorem = require('@jamen/lorem')

lorem(100)
// 'Lorem ipsum ...'
```

### How it works

Lorem contains words with 2-13 characters. You can use that to create sample text that looks nice at any byte size.

```
$ for i in (seq 60 70); echo $i (lorem $i); end
60 Lorem ipsum eiusmod cupidatat minim exercitation incididunt.
61 Lorem ipsum adipiscing ad consequat est qui id reprehenderit.
62 Lorem ipsum consequat mollit amet in incididunt reprehenderit.
63 Lorem ipsum excepteur sed cupidatat dolore consectetur ullamco.
64 Lorem ipsum in cupidatat consectetur labore nulla reprehenderit.
65 Lorem ipsum exercitation sed tempor duis consectetur consectetur.
66 Lorem ipsum magna incididunt mollit aliquip exercitation occaecat.
67 Lorem ipsum occaecat nulla dolor exercitation dolore reprehenderit.
68 Lorem ipsum ipsum excepteur sint adipiscing incididunt exercitation.
69 Lorem ipsum laborum exercitation enim voluptate esse ad exercitation.
70 Lorem ipsum ad duis pariatur commodo ut incididunt voluptate pariatur.
```

Past a certain length it starts randomly creating new sentences and commas.

```
$ lorem 200
Lorem ipsum consequat cupidatat laborum qui proident esse cillum exercitation
irure. Cupidatat labore labore laborum ad mollit? Incididunt irure nisi
excepteur occaecat deserunt dolore eu consectetur.

$ lorem 200
Lorem ipsum duis eu occaecat consectetur consectetur deserunt, consectetur in
dolor ullamco ea anim, in occaecat incididunt consectetur laboris cupidatat
esse sit voluptate aliquip ex ea exercitation.
```
npm package: @jamen/markdown-to-code
Description: A literate programming tool using markdown and its codeblocks.
Author: Jamen Marz
Latest version: 0.2.0

# @jamen/markdown-to-code

A [literate programming][1] tool using markdown and codeblocks.  It turns codeblocks into source code and the rest of the content into comments, allowing you to execute or analyze only the code.

## Install

```
npm i @jamen/markdown-to-code
```

Or quickly use command-line utility:

```sh
npx @jamen/markdown-to-code foo.md foo.js
```

## Usage

### `markdownCode(options?)`

Compiles an `input` stream with the given options, returns a readable stream.

```js
let compileMarkdown = markdownCode({
    language: 'js',
    mode: {
        opener: '/**',
        normal: ' * ',
        closer: ' **/'
    }
})

createReadStream('input.md')
.pipe(compileMarkdown)
.pipe(createWriteStream('output.js'))
```

### `markdown-to-code <input> <output>`

Command-line tool that compiles the input file to the output file. Uses stdio without files.

Use `--mode` or `-m` to set the commenting mode (see [lib/modes.json](lib/modes.json)).

To opt-in or opt-out of codeblocks turning into code, you use HTML comments above them containing the word "export".  By default this is an opt-in behavior, but you can use the `--all` or `-a` flag to make it opt-out (everything is exported)

[1]: https://en.wikipedia.org/wiki/Literate_programming
npm package: @jamen/mdc
Description: Compile directory of markdown into HTML and JSON fragments.
Author: Jamen Marz
Latest version: 0.0.1


# mdc

Compile directory of markdown into HTML and JSON fragments.

## Install

```shell
npm i -g mdc
```

## Usage

### `mdc *.md -o output/ --no-index? --no-json?`

Compiles each markdown file into an HTML file, using an `index.json` to store the front matters and paths:

```shell
$ mdc *.md -o dist
# Results in:
# .
# ├── dist
# │   ├── 2018-06-13-test-article-1.html
# │   ├── 2018-06-13-test-article-2.html
# │   └── index.json
# ├── test-article-1.md
# └── test-article-2.md
```

With `--no-index`, instead of an `index.json` file, separate JSON files of the front matters are created alongside the HTML files (as `*-info.json`):

```shell
$ mdc *.md -o dist --no-index
# Results in:
# .
# ├── dist
# │   ├── 2018-06-13-test-article-1.html
# │   ├── 2018-06-13-test-article-1-info.json
# │   ├── 2018-06-13-test-article-2.html
# │   └── 2018-06-13-test-article-2-info.json
# ├── test-article-1.md
# └── test-article-2.md
```

With `--no-json`, JSON and front matter is omitted entirely:

```shell
$ mdc *.md -o dist --no-json
# Results in:
# .
# ├── dist
# │   ├── 2018-06-13-test-article-1.html
# │   └── 2018-06-13-test-article-2.html
# ├── test-article-1.md
# └── test-article-2.md
```

With one input, you can omit `-o` or `--output` to use stdout instead:

```shell
# Compile to stdout
$ mdc input.md
$ mdc input.md --no-json
```

Every input must have 'title', 'author', 'created', and 'license' properties.

### `mdc(input, output?)`

Function to compile a markdown file into an HTML file, and returns an info object as a promise.  Without `output` the HTML is returned inside the object.

Features of the compiler:

- Made with [markdown-it][1] and [front-matter][2].
- Adds [LaTeX][3], [footnotes][4], and [deflists][5], similar to Pandoc Markdown.
- Adds the [decorate][6] and [imsize][7] plugins for setting classes, attributes, sizes, etc.
- Front matter validated against [a schema][8].

```js
let result = await mdc('./input.md', './dist')
// result.htmlFile

let result = await mdc('./input.md')
// result.htmlBody
```

See [lib/schema.js][8] for more info on the return value.

### License Types

Inspired from [markdown-to-medium][9], the license types are:

- all-rights-reserved
- cc-40-by
- cc-40-by-nd
- cc-40-by-sa
- cc-40-by-nc
- cc-40-by-nc-nd
- cc-40-by-nc-sa
- cc-40-zero
- public-domain

[1]: https://npmjs.com/markdown-it
[2]: https://npmjs.com/front-matter
[3]: https://npmjs.com/markdown-it-katex
[4]: https://npmjs.com/markdown-it-footnotes
[5]: https://npmjs.com/markdown-it-deflist
[6]: https://npmjs.com/markdown-it-decorate
[7]: https://npmjs.com/markdown-it-imsize
[8]: lib/schema.js
[9]: https://www.npmjs.com/package/markdown-to-medium