Coder Social home page Coder Social logo

peerio-client-api's Introduction

(Legacy) Peerio client API library

This repository contains core code used by "legacy" Peerio mobile clients.

Components:

  • Crypto library src/crypto
  • Networking layer src/network
  • Application logic layer src/app_logic
  • Flux-ish event system src/events
  • Shared objects/models src/model

TOC

usage

distribution package

Distribution files are located in /dist/ folder.

  1. peerio_client_api.js - concatenated file containing:
    • A few vendor scripts peerio-client-api relies on.
    • Most of the peerio-client-api scripts.
  2. config_template.js - configuration file template.
  3. socket_worker.js - worker script for WebSocket handling socket operations.
  4. socket.io.js - socket.io client script. Socket worker will import it when started.
  5. dict/*.txt - passphrase generation dictionaries for different languages.

installing, configuring and initializing peerio-client-api in your project

  1. Install bower package peerio-client-api or clone this repository and execute gulp build to produce distribution files.

  2. Copy distribution files anywhere in your project, retaining folder structure. Or keep them at your bower files location.

  3. Copy or rename config_template.js to config.js anywhere in your project. Change configuration to reflect your preferences. If you are updating peerio-client-api and already have config.js, look at the new config_template.js to find and manually apply changes.

  4. Include scripts retaining order

    <script src="{yourpath}\config.js" \>
    <script src="{yourpath}\peerio-client-api.js" \>
  5. ondomready and/or ondeviceready call Peerio.InitAPI().

contributing

npm install -g eslint babel-eslint eslint-react

style guide

Please follow this simple style guide:

  1. Indentation: 4 spaces
  2. File names: lower_cased_and_underscored
  3. Variables and function names: camelCased
  4. Constructor functions and namespaces: PascalCased
  5. Constants: UPPER_CASE_UNDERSCORED
  6. 'single quotes'
  7. strictEquality === good
  8. Line termination: mandatory semicolon ;
  9. You are free to follow your taste with other style aspects, but don't change formatting of the code you are not working with.
  10. Use promises, not callbacks.

testing

gulp test

This starts:

  • gulp watcher, it builds source files into dest folder.
  • karma server watching dest folder changes.

commit checklist

  1. Tests are not failing.
  2. New code is covered with tests.
  3. Run gulp build before commit.
  4. README.md is updated with information relevant tou your commit.
  5. Commit message: laconic, but descriptive. Reference #github_issue_id or #multiple #issue #ids.

peerio-client-api's People

Contributors

anri-asaturov avatar seavan avatar skylarnagao avatar jandre3000 avatar flohdot avatar faust64 avatar

Watchers

James Cloos avatar Mona Ghassemi 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.