1.0.1 • Published 9 years ago

cordova-plugin-bb-card v1.0.1

Weekly downloads
3
License
Apache 2.0
Repository
github
Last release
9 years ago

#BlackBerry 10 Cordova Plugins This repo contains plugins for Apache Cordova that expose functionality of the BlackBerry 10 platform.

##Using Cordova BlackBerry Plugins ###Prerequisites 1. Install WebWorks

###Adding project plugins 1. cdproject 1. webworks plugin addplugin_name

###Updating project plugins To update a plugin, run:

  1. webworks plugin removeplugin_name
  2. webworks plugin addplugin_name

###Using custom built plugins 1. webworks plugin add plugin_name --searchpathpath_to_custom_plugin_directory

##Maintaining / Creating Plugins ###Build Prerequisites 1. Install node and npm and add to path 1. Install BlackBerry Native SDK if you need to build JNEXT extensions 1. Windows Add git.exe to PATH, i.e. Git Installation Directory\bin 1. Install jake globally (npm install --global jake) 1. Install jshint globally (npm install --global jshint)

###Setup and Build 1. git clone https://github.com/blackberry/cordova-blackberry-plugins/ 1. cd cordova-blackberry-plugins 1. git fetch origin 1. git checkout master 1. npm install to install dependencies 1. Setup bbndk environment variables: (must be done within each session, prior to jake) - Mac/Linux sourceBBNDK installation directory/bbndk-env.sh - Windows BBNDK installation directory\bbndk-env.bat 1. jake build - check that there are no errors

###Running Tests 1. jake test - to run js tests using nodejs 1. jake hint - to run jshint on the JavaScript source 1. jake - default is to build, run tests and jshint

Note: To see a full list of commands available with jake, use jake -T.

###Dependencies 1. cpplint is used for linting C++ code. Source code is located under dependencies/cpplint 1. JNEXT 1.0.8.3 is used to build extensions Original source of JNEXT Modifications are available in source code and located under dependencies/jnext_1_0_8_3

Authors

General Architecture

  • client.js – The extension's public API
  • index.js – Loaded by Cordova and only accessible across the cordova.exec bridge
  • manifest.json – Metadata for the extension
  • native – Contains all the native code for the JNEXT extension
  • test
    • integration – test app spec using Jasmine browser tests
    • unit – unit tests using jasmine. Keeps the same folder structure as the code

How to build an extension?

Extensions are all under the plugin/ folder. An extension must at least contain the following:

  • manifest.json – metadata for the extension
  • client.js – Front facing API, this is injected into the App's content
  • index.js – Controller loads this part of the API

If your extension requires native C/C++ code, a native JNEXT extension is needed. There is a sample and there are detailed docs.

Contributing

To contribute code to this repository you must be signed up as an official contributor.

  1. Fork the cordova-blackberry-plugins repository
  2. Make the changes/additions to your fork
  3. Send a pull request from your fork back to the cordova-blackberry-plugins repository
  4. If you made changes to code which you own, mention a committer listed below to have your code merged using @user notation.

Committers

Other related Repos