# @aaronmh/rollup-plugin-rebase

> The Rollup Rebase Plugin copies static assets as required from your JavaScript code to the destination folder and adjusts the references in there to point to the new location. Forked from rollup-plugin-rebase

Latest version **1.1.2** (published 2022-05-06) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2022-05-06 |
| First published | 2022-05-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 10 |
| Unpacked size | 66.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | aaronmh |
| Keywords | rollup-plugin, file, assets |

## Links

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

## Dependencies (10)

- [core-js](https://npm.io/package/core-js.md) ^3.21.1
- [postcss](https://npm.io/package/postcss.md) ^8.4.12
- [sugarss](https://npm.io/package/sugarss.md) ^4.0.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.1
- [asset-hash](https://npm.io/package/asset-hash.md) ^4.1.0
- [postcss-sass](https://npm.io/package/postcss-sass.md) ^0.5.0
- [postcss-scss](https://npm.io/package/postcss-scss.md) ^4.0.3
- [postcss-import](https://npm.io/package/postcss-import.md) ^14.1.0
- [@rollup/pluginutils](https://npm.io/package/@rollup/pluginutils.md) ^4.2.0
- [postcss-smart-asset](https://npm.io/package/postcss-smart-asset.md) ^3.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.1.2 (latest) — 2022-05-06
- 1.1.1 — 2022-05-06
- 1.1.0 — 2022-05-05
- 1.0.0 — 2022-05-05

## README

# Rollup Rebase

Forked from [rollup-plugin-rebase](https://www.npmjs.com/package/rollup-plugin-rebase). This just adds a few small options I needed. Please use the original author's version, as this is intended for a specific project's needs, and will change with the needs of that project.

### Options (all optional)

- `assetFolder`: When set assets are placed inside a sub folder with that name.
- `keepName`: If `true`, generated filenames will be `${filename}~${hash}.${ext}` instead of just `${hash}.${ext}`
- `verbose`: If `true`, increases log level
- `include`: Standard include option for rollup plugins.
- `exclude`: Standard exclude option for rollup plugins.
- `skipHash`: Skips the step that adds a hash to the file names. Requires `keepName`.
- `includeScripts`: Enabled script files to be rebased, as they are ignored by default.
- `flatten`: Should the dir structure be flattened. Defaults to `true`
  - NOTE: If flatten is `false`, it will include the full folder structure from root by default.
- `buildFolderStructureFrom`: If you're rebasing a single folder, have flatten set to `false`, and don't want the full path to be copied, specify the path of the folder (from root) that you want excluded from the final path.
  - Example. include is set to `'src/resources/images/**'`. This option could be `'/src/resources/images/'`

## Copyright

Forked from:

[rollup-plugin-rebase](https://www.npmjs.com/package/rollup-plugin-rebase)

Copyright 2016-2022<br/>[Sebastian Software GmbH](http://www.sebastian-software.de)

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