Miss any of our Open RFC calls?Watch the recordings here! »

ractive-adaptors-ampersand

0.1.0 • Public • Published

Ractive.js Ampersand adaptor

Use Ampersand State classes (ampersand-state, ampersand-model, ampersand-collection, and ampersand-rest-collection) in your Ractive components.

Find more Ractive.js plugins at docs.ractivejs.org/latest/plugins

Installation

To use this adaptor, you will need to load the script, attach it to your applications Ractive function, and then create Ractive instances that reference it.

1. Inclusion

Via script tag: Include ractive-adaptors-ampersand.min.js on your page below Ractive, e.g:

<script src='lib/ractive.js'></script>
<script src='lib/ractive-adaptors-ampersand.min.js'></script>

Via AMD:

define(['ractive', 'ractive-adaptors-ampersand'],
  function(Ractive, RactiveAdaptorsAmpersand) {
    // See "2. Attaching" below
});

Via CommonJS:

var Ractive = require('ractive');
var RactiveAdaptorsAmpersand = require('ractive-adaptors-ampersand');
 
// See "2. Attaching" below

2. Attaching

However you include the script, attaching to Ractive will look similar:

window.Ractive.adaptors.Ampersand = window.RactiveAdaptorsAmpersand;

3. Activating

var myRactive = new Ractive({
  adapt: ['Ampersand']
});

Keywords

none

Install

npm i ractive-adaptors-ampersand

DownloadsWeekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • avatar