# next-dipe

> > Let your data flow in Next.js super easily.

Latest version **0.2.0** (published 2023-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-dipe
pnpm add next-dipe
yarn add next-dipe
bun add next-dipe
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-07-17 |
| First published | 2022-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | davidebruner |
| Keywords | nextJS, stream, data-processing, pipelines, data |

## Links

- npm: https://www.npmjs.com/package/next-dipe
- Repository: https://github.com/DavideBruner/data-pipe
- Homepage: https://github.com/DavideBruner/data-pipe#readme
- Issues: https://github.com/DavideBruner/data-pipe/issues
- npm.io page: https://npm.io/package/next-dipe

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2023-07-17
- 0.1.0 — 2023-07-17
- 0.0.33 — 2023-04-06
- 0.0.32 — 2022-08-25
- 0.0.31 — 2022-08-25
- 0.0.30 — 2022-08-25
- 0.0.29 — 2022-08-25
- 0.0.28 — 2022-08-25
- 0.0.27 — 2022-08-25
- 0.0.26 — 2022-08-25
- 0.0.25 — 2022-08-25
- 0.0.24 — 2022-08-25
- 0.0.23 — 2022-08-25
- 0.0.22 — 2022-08-25
- 0.0.21 — 2022-08-25
- … 13 more at https://npm.io/package/next-dipe/versions

## README

# next-dipe (next-data-pipe)

> Let your data flow in Next.js super easily.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

`next-dipe` is a small lib that wraps up `dipe (data-pipe)` and provides some additional utilies such as (for example in Next.js by lifting static props).

## Why would I need this?

This library works perfectly in combination with the [next-data-hooks](https://) library.

It works by lifliting up all the boilerplate needed for processing static or server data from props to pre-configured processors callbacks.

## Installation 🔧

```bash
npm install -S next-dipe

or

yarn add next-dipe
```

## Usage 💡

This library works as an etension of the `data-pipe` library, and provides some utilities build in for Next.js projects.

```js
// example.config.js
const { LocalFilesPostTask } = require("next-dipe");

const config = {
  articles: {
    processors: [() => {}, LocalFilesPostTask],
  },
};

export default config;
```

We also expose a `useConfig` utiltiy used to return a direct link to the config file.
To use that function it's necessary to first configure the webpack config to properly resolve the config file previously created.

```js
// next.config.js
const { resolveConfig } = require("next-dipe");
module.exports = {
  webpack: (config, options) => {
    return resolveConfig(config, { configFilePath: "./example.config.js" });
  },
};
```

And then the actual implementation will look just like:

```js
import { getConfig, runSync } from "next-dipe";

const articles = getConfig("articles");
let { data, errors } = runSync(articles, {});
```

> You can totally skip this part and just use the `next-dipe` package (as shown below):

```js
import { runSync } from "next-dipe";
let { data, errors } = runSync(
  {
    processors: [],
  },
  {}
);

// or
import config from "../example.config.js";
let { data, errors } = runSync(config.articles, {});
```

See the example in this repo for some ideas on how to organize your data using preconfigured processors.
And check what you can do with the `data-pipe` package [here]().

[version-image]: https://img.shields.io/npm/v/next-dipe
[version-url]: https://npmjs.org/package/next-dipe
[license-image]: https://img.shields.io/npm/l/next-dipe
[license-url]: hhttps://github.com/DavideBruner/data-pipe/tree/main/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/next-dipe
[size-url]: https://github.com/DavideBruner/data-pipe/tree/main/packages/next-data-pipe/dist/index.js
[download-image]: https://img.shields.io/npm/dm/next-dipe
[download-url]: https://www.npmjs.com/package/next-dipe

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