rollup-plugin-reactive-assignments
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

rollup-plugin-reactive-assignments

Use the reactive-assignments compiler with Rollup

Installation

npm i rollup-plugin-reactive-assignments -D

Usage

// 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.

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

Contributing?

Sure!

# 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! 😉

License

MIT

Package Sidebar

Install

npm i rollup-plugin-reactive-assignments

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

6.13 kB

Total Files

6

Last publish

Collaborators

  • vehmloewff