waves
A view library built on top of Ripple. Waves is to Ripple as Myth is to Rework. Makes it easier to get started with Ripple if you're using Browserify or if you're not using a package manager at all.
If you're using Component, you're better off using ripple directly.
It's just ripple but with a few plugins (listed below) included for you, to get you started:
Install
npm install waves
Then you can do:
var waves = require('waves');
Standalone
This adds a waves
variable to the window.
Usage
<body>
<!-- example view -->
<script type="text/template" id="person">
<div>{{name}}</div>
</script>
<!-- bind your view with data -->
<script>
var Person = waves('#person');
var person = new Person({
data: {
name: 'Gus'
}
})
person.appendTo(document.body);
</script>
</body>
You can reference waves using a CSS selector:
var Person = waves('#person');
or pass in a template string directly:
var Person = waves('<div>{{name}}</div>');
You might do an AJAX request to get the template or store the templates on the page.