Code Monkey home page Code Monkey logo

gringotts's Introduction

Gringotts Build Status

A collection of functional mixins and utilities supporting common behaviors found in web apps built with Chaplin and Handlebars.

Several behaviors take advantage of aspect-oriented programming (AOP) with Flight's advice component.

Some behaviors add properties onto the mixed in object to support default or common properties/behaviors placed on the object's parent prototypes.

Here's an example of how to use a mixin:

mixin = require 'mixin'
chaplinObj = {}
mixin.call chaplinObj, {key1: 'stuff', key2: 'moreStuff'}

The first argument is the object the behavior is being added to. The second argument is an optional configuration object.

When used within a view or collection definition chaplinObj above will generally be @prototype.

The mixins can be used classically (via _.extend) by invoking them as a constructor (with new).

Most of the mixins involving collections expect the payload to be nested (e.g. {"count": 100, "items": [{...}]}) so views using them are intended to be paginated. The behaviors have been broken out so they can be used separately or together. You can also specify and override properties on collections.

For more information, see the docs.

Getting Started

Installation

If you've never installed or used npm or bower, you can skip the associated cache commands.

npm cache clear
bower cache clean
npm install
bower install

Testing the project

If you start grunt, then the specs will run automatically when .coffee files are saved.

Alternatively, you can run grunt test which will run the specs via PhantomJS and generate code coverage reports.

Visit localhost:8000 to debug the tests in a browser.

Local docs

You can view docs locally at localhost:8000/docs/

Pushing changes

After making a change, please remember to update the docs with grunt docs.

Also, make sure to publish a new version tag with grunt release so projects can retrieve the change. The release task takes the same options as the bump task (release:minor, release:major) and defaults to a patch release.

gringotts's People

Contributors

naganowl avatar

Watchers

 avatar

Forkers

d6-9b bzalasky

gringotts's Issues

consolidating the error handling mixins

There exists three mixin' which deal with form error handling. This ticket is to discovery and implement converting them into one single mixin'. Default model and collection error handling within Backbone should make this possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.