Coder Social home page Coder Social logo

chiropractor's Introduction

Chiropractor

Build Status

Straighten out your Backbone.js

Usage

For the time being we are not bundling all of the dependencies for this module into the chiropractor.js file, instead you will need to define those dependencies yourself. You can reference the bower.json file to get a list of all of the dependencies (both development and production) or reference build.js to see what the bare minimum requirejs configuration file looks like to support this module.

require.config({
    paths: {
        'chiropractor':       'bower_components/chiropractor/chiropractor',
        'handlebars':         'bower_components/require-handlebars-plugin/Handlebars',
        'hbs':                'bower_components/require-handlebars-plugin/hbs',
        'i18nprecompile':     'bower_components/require-handlebars-plugin/hbs/i18nprecompile',
        'json2':              'bower_components/require-handlebars-plugin/hbs/json2',
        'underscore':         'bower_components/underscore/underscore',
        'jquery':             'bower_components/jquery/jquery',
        'jquery.cookie':      'bower_components/jquery.cookie/jquery.cookie'
    },

    hbs: {
        disableI18n: true,
        disableHelpers: true
    },

    pragmasOnSave: {
        excludeHbsParser : true,
        excludeHbs: true,
        excludeAfterBuild: true
    },

    shim: {
        'underscore': {
            exports: '_'
        },
        'jquery.cookie': {
            deps: ['jquery'],
            exports: 'jQuery.cookie'
        }
    }
});

Building

To get started developing Chiropractor you must first run two commands to install all of the dependencies:

npm install
bower install

In order to compile the Chiropractor code for release you must run:

grunt

Which will generate chiropractor.js as well as chiropractor.min.js in the root of the project. Whenever you wish to run this command, please be sure to increment the version defined in package.json as well as bower.json.

Tests

There are two ways to run tests:

npm test

Or if you want more control over how your tests are run (such as continuous testing with auto-running tests on file changes you can run:

./node_modules/.bin/karma start --dev --browsers Chrome,PhantomJS

Previewing

You can preview example functionality of Chiropractor by first running:

grunt devserver

goto: http://localhost:8888

Also you check out the /example folder for the source code of these examples in how to integrate Chiropractor into your project.

Enabling ErrorHandling

You can enable Chiropractor default error handler for api unreachable or error codes by setting the property: enableErrorHandler: true in your model or collection.

You can also override or create your own custom error template by overriding the row "error" template with your own.

Using Chiropractor 0.1.20++

You will need to add these paths:

'chiropractor-path': '../components/chiropractor',
'jquery.cors': '../components/chiropractor/jquery.cors',

Also you will need to add these shims:

'console-shim': {
      exports: 'console'
},
'json2': { exports: 'JSON' },

chiropractor's People

Contributors

easel avatar incognos avatar jasonh1 avatar johnnydobbins avatar nowells avatar odiseo42 avatar vladfernandes avatar

Watchers

 avatar

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.