open-index/open-npm huggingface dataset:
npm package: @ngsctt/arborist
Description: A Node.js file tree builder
Author: Nathan Scott
Latest version: 0.2.1

# arborist
## What
A Node.js directory tree builder

## Why
I initially tried using [directory-tree][], but found it wasn't flexible enough

## How
### Installation
```
npm i @ngsctt/arborist
```

### Usage
```js
const arborist = require('@ngsctt/arborist');

const rootDir = 'directory';      // relative to __dirname
const options = {
  stats: ["birthtime", "mtime"],  // lstatSync properties to include
  path: ["dir", "base", "name"],  // Node path properties to include
  exclude: ["^.DS_Store", "^_"]   // globs to exclude
}
const maxDepth = 10;              // maximum depth of tree

const tree = arborist(rootDir, options, maxDepth)
```

## Licence
This project is released under the [MIT Licence](/LICENSE).



[directory-tree]: https://www.npmjs.com/package/directory-tree
npm package: @ngsctt/eslint-config
Description: Basic ESLint configuration
Author: Nathan Scott
Latest version: 1.2.0

# ngsctt/eslint-config

## What
A basic ESLint configuration

## How
Command line:
```
npm i @ngsctt/eslint-config --save-dev
```

`.eslintrc`:
```
"extends": "@ngsctt"
```
npm package: @ngsctt/prettier-config
Description: A basic Prettier configuration
Author: Nathan Scott
Latest version: 0.1.0

# prettier-config

A basic Prettier configuration

# How
Command line:
```
npm i @ngsctt/prettier-config --save-dev
```

`package.json`:
```
prettier: "@ngsctt/prettier-config"
```

# Licence
Released under the MIT [Licence](/LICENCE)
npm package: @ngsctt/remark-smartypants
Description: A plugin to apply smartypants formatting to markdown processed with Remark
Author: Nathan Scott
Latest version: 0.2.0

# @ngsctt/remark-smartypants
A plugin to apply [SmartyPants][] formatting to markdown processed with [Remark][].
Uses [retext-smartypants][] Based on the tutorials at https://mdxjs.com/advanced/plugins#using-retext-plugins and https://unifiedjs.com/learn/guide/create-a-plugin/.
Probably very similar or identical to [@silvenon/remark-smartypants][silvernon] for that reason.
Additionally checks that the text is not inside a `<script>` or `<style>` node.

## Why
I wanted smart quotes in my markdown, and I didn't want to litter my code with this plugin.

## How
### Install
[pnpm][pnpm i]:
```
pnpm install @ngsctt/remark-smartypants
```

[npm][]:
```
npm install @ngsctt/remark-smartypants
```

### Use
```javascript
const smartypants = require('@ngsctt/remark-smartypants');

const unified = require('unified');
const remark = require('remark-parse');
const rehype = require('remark-rehype');
const html = require('rehype-stringify');

const input = `"Why Holmes!" I exclaimed. "How on earth could you know that?"`

unified()
  .use(remark)
  .use(rehype)
  .use(smartypants)
  .use(html)
  .process(input, (error, formatted) => {
    console.log = String(formatted);
  });
```

Output:
```html
<p>“Why Holmes!” I exclaimed. “How on earth could you know that?”</p>
```

## Why `pnpm`?
[pnpm][] conserves disk space by caching packages and symlinking them. It's much more in-line with how I like to use my computers.

## Licence
Copyright 2020 Nathan Scott. Released under the [MIT Licence][licence].

[smartypants]: https://daringfireball.net/projects/smartypants
[remark]: https://remark.js.org
[retext-smartypants]: https://npm.im/retext-smartypants
[silvernon]: https://npm.im/@silvenon/remark-smartypants
[pnpm i]: https://pnpm.js.org/en/cli/install
[npm]: https://docs.npmjs.com/cli/install
[pnpm]: https://pnpm.js.org/en/

[licence]: /LICENCE
npm package: @ngsctt/shadow-box
Description: A utility to create drop shadow boxes for terminal output. Inspired by boxen
Author: Nathan Scott
Latest version: 0.1.1

# shadow-box

A basic utility to draw boxes with drop shadows in command line output. Heavily inspired by [boxen][].

## Why
I couldn't find any other packages that produce drop shadows using basic box drawing elements, so I made my own.

## How
1. Install the package:
    ```
    npm i @ngsctt/shadow-box
    ```
    Or, using [pnpm][]:
    ```
    pnpm i @ngsctt/shadow-box
    ```

2. Require the package:
    ```js
    const shadowBox = require('@ngsctt/shadow-box');
    ```

3. Use the package:
    ```js
    const text = 'Some text, including ' + chalk.yellowBright('highlights') + ',\n can be used.';
    const shadowBoxOptions = {  // default options:
      background: '#0000ff',
      shadow: '#ff0000',
      padX: 2,
      padY: 1,
      marX: 3,
      marY: 1,
      newLine: '\n',
      padChar: ' ',
      align: 'center'
    };

    console.info(shadowBox(text, shadowBoxOptions));
    ```

    ![Example terminal output](/example.png)

## Licence
Released under the MIT [Licence](/LICENCE).


[boxen]: https://github.com/sindresorhus/boxen
[pnpm]:  https://pnpm.js.org
npm package: @ngsctt/swup-preserve-scroll-plugin
Description: Plugin for swup to preserve the scroll position of specified elements
Author: Nathan Scott
Latest version: 0.1.0

# Swup Preserve Scroll Plugin

This is a plugin for [swup][] — complete, flexible, extensible and easy to use page transition library for your web.

Using this plugin, when swup replaces page content, any elements matching a selector (`.swup-preserve-scroll` by default) will have their current scroll position preserved, and reimposed on their replacement element.

## Installation

This plugin can be installed with npm

```bash
npm install @ngsctt/swup-preserve-scroll-plugin
```

and included with import

```javascript
import SwupPreserveScrollPlugin from '@ngsctt/swup-preserve-scroll-plugin';
```

or included from the dist folder

```html
<script src="./dist/SwupPreserveScrollPlugin.js"></script>
```

## Usage

To run this plugin, include an instance in the swup options:

```javascript
const swup = new Swup({
  plugins: [new SwupPreserveScrollPlugin()]
});
```

To customise the options, pass an object to the plugin:

```javascript
const options = {
  selector: '.swup-preserve-scroll',
  quiet: false
};
const swup = new Swup({
  plugins: [new SwupPreserveScrollPlugin(options)]
});
```

### Options

`options.selector`: The query selector used to get the elements on the page which the plugin will replace. Defaults to `'.swup-preserve-scroll'`.

`options.quiet`: If set to `true`, suppresses warnings about missing `id` attributes, or about no elements on the page matching `options.selector`. Defaults to `false`.

### Important note
Each element that matches `options.selector` ***MUST*** have an [`id` attribute][mdn id] set in order for the plugin to work on that element. If it doesn't, the plugin will throw a warning (unless `options.quiet` is set to `true`).


[swup]:   https://swup.js.org/
[mdn id]: https://developer.mozilla.org/docs/Web/HTML/Global_attributes/id
npm package: @ngsctt/term-color
Description: A lighter weight alternative to chalk. Forked to slim down package.
Author: ngsctt
Latest version: 1.1.0

# term-color

<!--
    [![build status][build-png]][build]
    [![Coverage Status][cover-png]][cover]
    [![Davis Dependency status][dep-png]][dep]
-->

<!-- [![NPM][npm-png]][npm] -->

A lighter weight alternative to chalk

## Example

```js
var TermColor = require("term-color");

console.log(TermColor.red('foo'))
```

## Motivation

```sh
raynos at raynos-SVS15127PXB  ~/projects/chalk on master
$ npm ls --prod
chalk@1.0.0 /home/raynos/projects/chalk
├── ansi-styles@2.0.1
├── escape-string-regexp@1.0.3
├─┬ has-ansi@1.0.3
│ ├── ansi-regex@1.1.1
│ └── get-stdin@4.0.1
├─┬ strip-ansi@2.0.1
│ └── ansi-regex@1.1.1
└── supports-color@1.3.1
```

```sh
raynos at raynos-SVS15127PXB  ~/projects/term-color on master
$ npm ls --prod
term-color@1.0.0 /home/raynos/projects/term-color
├── ansi-styles@2.0.1
└── supports-color@1.3.1
```

`term-color` adds colors to your library but only costs 3
dependencies instead of costing 9 dependencies.

## Supported formats

```js
TermColor.black('text');
TermColor.red('text');
TermColor.green('text');
TermColor.yellow('text');
TermColor.blue('text');
TermColor.magenta('text');
TermColor.cyan('text');
TermColor.white('text');
TermColor.gray('text');
TermColor.bgBlack('text');
TermColor.bgRed('text');
TermColor.bgGreen('text');
TermColor.bgYellow('text');
TermColor.bgBlue('text');
TermColor.bgMagenta('text');
TermColor.bgCyan('text');
TermColor.bgWhite('text');
TermColor.reset('text');
TermColor.bold('text');
TermColor.dim('text');
TermColor.italic('text');
TermColor.underline('text');
TermColor.inverse('text');
TermColor.hidden('text');
TermColor.strikethrough('text');
```

## Installation

`npm install term-color`

## Tests

`npm test`

## Contributors

 - Raynos

## MIT Licensed

  [build-png]: https://secure.travis-ci.org/Raynos/term-color.png
  [build]: https://travis-ci.org/Raynos/term-color
  [cover-png]: https://coveralls.io/repos/Raynos/term-color/badge.png
  [cover]: https://coveralls.io/r/Raynos/term-color
  [dep-png]: https://david-dm.org/Raynos/term-color.png
  [dep]: https://david-dm.org/Raynos/term-color
  [npm-png]: https://nodei.co/npm/term-color.png?stars&downloads
  [npm]: https://nodei.co/npm/term-color