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
Distribution files are located in /dist/
folder.
peerio_client_api.js
- concatenated file containing:- A few vendor scripts peerio-client-api relies on.
- Most of the peerio-client-api scripts.
config_template.js
- configuration file template.socket_worker.js
- worker script for WebSocket handling socket operations.socket.io.js
-socket.io
client script. Socket worker will import it when started.dict/*.txt
- passphrase generation dictionaries for different languages.
-
Install bower package
peerio-client-api
or clone this repository and executegulp build
to produce distribution files. -
Copy distribution files anywhere in your project, retaining folder structure. Or keep them at your bower files location.
-
Copy or rename
config_template.js
toconfig.js
anywhere in your project. Change configuration to reflect your preferences. If you are updating peerio-client-api and already haveconfig.js
, look at the newconfig_template.js
to find and manually apply changes. -
Include scripts retaining order
<script src="{yourpath}\config.js" \> <script src="{yourpath}\peerio-client-api.js" \>
-
ondomready
and/orondeviceready
callPeerio.InitAPI()
.
npm install -g eslint babel-eslint eslint-react
Please follow this simple style guide:
- Indentation:
4 spaces
- File names:
lower_cased_and_underscored
- Variables and function names:
camelCased
- Constructor functions and namespaces:
PascalCased
- Constants:
UPPER_CASE_UNDERSCORED
'single quotes'
strictEquality === good
- Line termination: mandatory semicolon
;
- You are free to follow your taste with other style aspects, but don't change formatting of the code you are not working with.
- Use promises, not callbacks.
gulp test
This starts:
- gulp watcher, it builds source files into
dest
folder. - karma server watching
dest
folder changes.
- Tests are not failing.
- New code is covered with tests.
- Run
gulp build
before commit. README.md
is updated with information relevant tou your commit.- Commit message: laconic, but descriptive. Reference
#github_issue_id
or#multiple #issue #ids
.