# rollup-plugin-reactive-assignments

> Use the reactive-assignments compiler with Rollup

Latest version **0.1.2** (published 2020-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-reactive-assignments
pnpm add rollup-plugin-reactive-assignments
yarn add rollup-plugin-reactive-assignments
bun add rollup-plugin-reactive-assignments
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2020-03-05 |
| First published | 2020-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vehmloewff |
| Maintainers | vehmloewff |
| Keywords | reactive-assignments, rollup |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-reactive-assignments
- Repository: https://github.com/Vehmloewff/rollup-plugin-reactive-assignments
- Issues: https://github.com/Vehmloewff/rollup-plugin-reactive-assignments/issues
- npm.io page: https://npm.io/package/rollup-plugin-reactive-assignments

## 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) — 2020-03-05
- 0.1.1 — 2020-03-04
- 0.1.0 — 2020-03-04

## README

# rollup-plugin-reactive-assignments

Use the [reactive-assignments compiler](https://github.com/Vehmloewff/reactive-assignments) with [Rollup](http://rollupjs.org)

## Installation

```sh
npm i rollup-plugin-reactive-assignments -D
```

## Usage

```js
// rollup.config.js
import reactiveAssignments from 'rollup-plugin-reactive-assignments';

export default {
	// ...
	plugins: [
		// ...
		reactiveAssignments({
			// You can specify which files are compiled using 'include' and 'exclude'
			include: 'src/**/*.r.js', // Default is `**/*.r.(js|ts)`
			exclude: 'src/reactive/lib/**', // Default is null

			// Where the reactive-assignments runtime is located
			runtime: 'reactive-assignments', // This is default

			// What variables are never goinig to be reactive, and
			// that the compiler should not mess with?
			predefinedGlobals: ['console'], // This is default

			// You can disallow the generating of sourcemaps if you need to
			sourcemaps: false,
		}),
	],
};
```

## Typescript support?

Sure thing! Just be sure to put your typescript plugin _before_ this plugin in the `plugins` array.

```js
export default {
	// ...
	plugins: [typescript(), reactiveAssignments()],
};
```

## Contributing?

**Sure!**

```sh
# fork repo
git clone https://github.com/[your_username]/rollup-plugin-reactive-assignments.git
cd rollup-plugin-reactive-assignments
npm i
npm test -- -w
```

Pull Requests are always welcome!

_PS: Don't forget to `npm run lint`!_ :wink:

## License

[MIT](/LICENSE)

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