Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 2 KB

README.md

File metadata and controls

71 lines (52 loc) · 2 KB

maquette-spine

Dependency Status devDependency Status Downloads

Widget base classes for Spine Controllers+Models rendered through Maquette views

NPM

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

class Filter extends Spine.Model
  @configure "Filter",
    "type",
    "value"
li(class="filter #{type}" id="filter-#{id}" key=id)
  h6 #{type}:
    span.value= value
  button.icon.delete(title="delete") Â
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