maquette-spine
v1.0.0
Published
Widget base classes for Spine Controllers+Models rendered through Maquette views
Downloads
21
Maintainers
Readme
maquette-spine
Widget base classes for Spine Controllers+Models rendered through Maquette views
Installation
npm install --save-dev maquette-spine
Usage -- ListController
A helper controller for common usage of maquette-mapper.
Example: el-borracho-ui + gulp-pug-hyperscript
Model filter.coffee
class Filter extends Spine.Model
@configure "Filter",
"type",
"value"
View filter.jade
li(class="filter #{type}" id="filter-#{id}" key=id)
h6 #{type}:
span.value= value
button.icon.delete(title="delete") Â
filters.jade
ul!= filters()
Controller
ListController = require "maquette-spine/controllers/list"
class ExampleController extends ListController
constructor: (options) ->
jQuery.extend options,
Store: require "../models/filter"
view: require "../views/filters"
itemView: require "../views/filter"
super
License
MIT