Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

mwaylabs/mcapjs-client

Repository files navigation

Build Status

This library is deprecated and won't be maintained anymore!

Please do not use it anymore. For the backbone nested model functionality please refer to our new library

mCAP JavaScript Client Library

A JavaScript library to develop applications for mCAP. You will find more informations about mCAP here.

Setup for development

  • Install NodeJS
  • Install Grunt
  • Run npm install
  • Run 'grunt' to start a watch task witch automatically builds the file in the dist folder
  • Include 'dist/mcap.js' in your index html

Before you commit

  • Make sure you pass the jshint test
  • You can setup a before commit-hook
    • Create a file in ./.git/hooks named pre-commit with the following content

    •    #!/bin/sh 
         grunt jshint  
      
    • Make sure you set the file permissions to executable $ chmod +x pre-commit

Tests

Install Jasmine:

We use Jasmine version 2.0.0 as test suite. You find further information here: Jasmine version 2.0.0

To install the node version of Jasmine run:

npm install jasmine-node -g

Run Karma:

We use Karma as test runner. To run the tests you have to complete the following steps. We are working on a solution to make the setup a bit easier

You have to install karma-cli global

npm install karma-cli -g

Install PhantomJS

npm install phantomjs -g

Set phantomjs env variable

export PHANTOMJS_BIN=$(which phantomjs)

To start a test use:

karma start karma.conf.js
// or
grunt test

It is also possible to test against a running server: Add a online.conf.js file to the root:

window.USERNAME = window.USERNAME || 'username';
window.ORGANIZATION = window.ORGANIZATION || 'org';
window.PASSWORD = window.PASSWORD || 'password';
karma start karma.online.conf.js

Documentation

Documentation

Changelog

Changelog

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published