maquette-spine

1.0.0 • Public • Published

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

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

Package Sidebar

Install

npm i maquette-spine

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • doublerebel