# simple-reproduction

> copy html with meta rewriting.

Latest version **1.4.6** (published 2022-10-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-reproduction
pnpm add simple-reproduction
yarn add simple-reproduction
bun add simple-reproduction
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.4.6 |
| Published | 2022-10-06 |
| First published | 2018-08-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Fujisawa Shin |
| Maintainers | fnobi |

## Links

- npm: https://www.npmjs.com/package/simple-reproduction
- Repository: https://github.com/fnobi/simple-reproduction
- Homepage: https://github.com/fnobi/simple-reproduction#readme
- Issues: https://github.com/fnobi/simple-reproduction/issues
- npm.io page: https://npm.io/package/simple-reproduction

## Dependencies (6)

- [he](https://npm.io/package/he.md) ^1.1.1
- [mz](https://npm.io/package/mz.md) ^2.7.0
- [pug](https://npm.io/package/pug.md) ^3.0.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.19
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2

## Recent versions

- 1.4.6 (latest) — 2022-10-06
- 1.4.4 — 2020-07-16
- 1.4.3 — 2020-06-16
- 1.4.2 — 2020-06-16
- 1.3.1 — 2020-06-16
- 1.4.0 — 2018-10-01
- 1.3.0 — 2018-09-16
- 1.2.0 — 2018-08-23
- 1.1.0 — 2018-08-23
- 1.0.1 — 2018-08-23
- 1.0.0 — 2018-08-23

## README

# simple-reproduction

copy html with meta rewriting.

## usage

### init

```js
const SimpleReproduction = require('simple-reproduction');

const DIST = 'dist';

const reproduction = new SimpleReproduction({
  dest: DIST,
});

reproduction.on('write', ({ htmlDest }) => {
  console.log('[write]', htmlDest);
});

reproduction.on('end', () => {
  console.log('[done]');
});
```

### copy html with injection

```js
reproduction.start({
  src: `${DIST}/index.html`,
  routes: {
    ['/share-test']: {
      title: 'dummy',
      meta: {
        description: 'dummy',
        'og:image': 'http://example.com/dummy1.png',
      },
    },
    ['/share-test2']: {
      title: 'dummy2',
      meta: {
        description: 'dummy',
        'og:image': 'http://example.com/dummy2.png',
      },
    },
  },
});
```

### build pug & html injection

```js
reproduction.start({
  src: `${DIST}/index.pug`,
  routes: {
    ['/share-test3']: {
      locals: {
        title: 'dummy3',
        description: 'dummy3',
        shareImage: 'http://example.com/dummy3.png',
      },
    },
  },
});
```

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