# @gordonmleigh/rollup-plugin-npm

> A Rollup plugin to install npm packages into the output

Latest version **0.1.2** (published 2023-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gordonmleigh/rollup-plugin-npm
pnpm add @gordonmleigh/rollup-plugin-npm
yarn add @gordonmleigh/rollup-plugin-npm
bun add @gordonmleigh/rollup-plugin-npm
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2023-12-22 |
| First published | 2023-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gordon Leigh |
| Maintainers | gordonmleigh |
| Keywords | rollup-plugin, rollup |

## Links

- npm: https://www.npmjs.com/package/@gordonmleigh/rollup-plugin-npm
- Repository: https://github.com/gordonmleigh/rollup-plugin-npm
- Homepage: https://github.com/gordonmleigh/rollup-plugin-npm#readme
- Issues: https://github.com/gordonmleigh/rollup-plugin-npm/issues
- npm.io page: https://npm.io/package/@gordonmleigh/rollup-plugin-npm

## Dependencies (2)

- [tempy](https://npm.io/package/tempy.md) ^3.1.0
- [memoize](https://npm.io/package/memoize.md) ^10.0.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2023-12-22
- 0.1.1 — 2023-12-17
- 0.1.0 — 2023-12-17

## README

# @gordonmleigh/rollup-plugin-npm

A Rollup plugin to install npm packages into the output.

Useful for generating deployment packages in conjunction with [@gordonmleigh/rollup-plugin-zip](https://github.com/gordonmleigh/rollup-plugin-zip).

```javascript
import npm from "@gordonmleigh/rollup-plugin-npm";

export default {
  input: "lib/index.js",

  output: {
    file: "dist/index.mjs",
  },

  plugins: [
    npm({
      // specify packages to install
      install: {
        // use "." to copy version from "./package.json" or specify semver
        leftpad: ".",
      },

      // architecture to install for (no default)
      arch: "arm64",

      // install image to use (defaults to "node")
      image: "node",

      // platform to install for (no default)
      platform: "linux",

      // used to install the correct dependencies (will use `npm ci`)
      lockFile: "./package-lock.json", // default
    }),
  ],
};
```

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