# hosts-bakery-2020-pmb

> Generate /etc/hosts lines from recipes, in the format used on PmB servers in 2020.

Latest version **0.2.0** (published 2021-10-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install hosts-bakery-2020-pmb
pnpm add hosts-bakery-2020-pmb
yarn add hosts-bakery-2020-pmb
bun add hosts-bakery-2020-pmb
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-10-24 |
| First published | 2020-12-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | M.K. |
| Maintainers | mk-pmb |
| Keywords | hosts, template |

## Links

- npm: https://www.npmjs.com/package/hosts-bakery-2020-pmb
- Repository: https://github.com/mk-pmb/hosts-bakery-2020-pmb-js
- Homepage: https://github.com/mk-pmb/hosts-bakery-2020-pmb-js/#readme
- Issues: https://github.com/mk-pmb/hosts-bakery-2020-pmb-js/issues
- npm.io page: https://npm.io/package/hosts-bakery-2020-pmb

## Dependencies (11)

- [nofs](https://npm.io/package/nofs.md) ^0.12.2
- [absdir](https://npm.io/package/absdir.md) ^1.0.6
- [objpop](https://npm.io/package/objpop.md) ^0.2.0
- [flatten](https://npm.io/package/flatten.md) ^1.0.3
- [p-fatal](https://npm.io/package/p-fatal.md) ^0.1.3
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [esmod-pmb](https://npm.io/package/esmod-pmb.md) ^0.1.11
- [strip-bom](https://npm.io/package/strip-bom.md) ^4.0.0
- [usnam-pmb](https://npm.io/package/usnam-pmb.md) ^0.2.4
- [lodash.padend](https://npm.io/package/lodash.padend.md) ^4.6.1
- [typechecks-pmb](https://npm.io/package/typechecks-pmb.md) ^0.200620.4

## Recent versions

- 0.2.0 (latest) — 2021-10-24
- 0.1.1 — 2020-12-02
- 0.0.1-security — 2020-12-02

## README

<!--#echo json="package.json" key="name" underline="=" -->
hosts-bakery-2020-pmb
=====================
<!--/#echo -->

<!--#echo json="package.json" key="description" -->
Generate /etc/hosts lines from recipes, in the format used on PmB servers in
2020.
<!--/#echo -->



API
---

This module exports one function:

### bakeHosts(opts)

Returns a promise for an array of strings that you could use as lines of
your `/etc/hosts` file.

`opts` is an optional options object that supports these optional keys:

* `head`: An array of prebaked lines at the top.
  May also be a string, in which case lines are read form there.
  Default: [`'ex://head'`](docs/examples/head.txt)
* `recipes`: Array of recipe names. Default: `[]` (empty array)
* `tail`: An array of prebaked lines at the bottom.
  May also be a string, in which case lines are read form there.
  Default: `['# eof']`
* `relat…`: Options for dealing with recipe names that don't include a
  slash (`/`).
  * `relatPre`: String to put in front. Default: `''` (empty string)
  * `relatSuf`: String to append if the recipe name doesn't already
    end with this suffix. Default: `'.txt'`
  * `relatFix`: A function to fix the intermediate result from
    `…Pre` and `…Suf`.
    This might be a good place to plug a path resolver.
* `glob`: If truthy, treat recipe names as glob patterns once stuff like
  `relat…` and `ex://…` have been resolved.
  Default: `true`




CLI
---

* Most options as above, e.g. `--relatSuf='.part'`.
* `recipes`: Use positional arguments instead.
* Booleans like `glob`: `--glob=yes` or `--glob=no`.




Usage
-----

:TODO:



<!--#toc stop="scan" -->



Known issues
------------

* Needs more/better tests and docs.




&nbsp;


License
-------
<!--#echo json="package.json" key=".license" -->
ISC
<!--/#echo -->

---
_Source: https://npm.io/package/hosts-bakery-2020-pmb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
