0.1.2 • Published 4 years ago
rollup-plugin-reactive-assignments v0.1.2
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
! :wink: