From 18c299fa3a6fa79a7771851f188239223df52271 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 4 Mar 2017 19:01:05 -0500 Subject: [PATCH] update docs --- README.md | 1 + docs/configuring-communication.rst | 22 ++++++++++++++++++++++ docs/configuring-storage.rst | 2 +- docs/creating-a-new-dapp.rst | 26 +++++++++++++++++++------- docs/embarkjs-communication.rst | 4 ++-- docs/embarkjs-storage.rst | 4 ++-- docs/index.rst | 1 + docs/tests.rst | 4 ++-- 8 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 docs/configuring-communication.rst diff --git a/README.md b/README.md index 8c913be4..ce29dc56 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ With Embark you can: **Blockchain (Ethereum)** * Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp. +* Contracts are available in JS with Promises. * Do Test Driven Development with Contracts using Javascript. * Keep track of deployed contracts, deploy only when truly needed. * Manage different chains (e.g testnet, private net, livenet) diff --git a/docs/configuring-communication.rst b/docs/configuring-communication.rst new file mode 100644 index 00000000..38bc909e --- /dev/null +++ b/docs/configuring-communication.rst @@ -0,0 +1,22 @@ +Configuring Communication (Whisper, Orbit) +========================== + +Embark will check your prefered communication configuration in the file ``config/communication.json``. This file will contain the prefered configuration for each environment. With ``default`` being the configuration fields that applies to every environment. Each of those can be individually overriden in a per environment basis. + +e.g : + +.. code:: javascript + + { + "default": { + "enabled": true, + "provider": "whisper", + "available_providers": ["whisper", "orbit"] + } + } + +options available: + * ``enabled`` (boolean: true/false) to enable or completly disable communication support + * ``provider`` (string: "wisper" or "orbit") desired provider to automatically connect to on the dapp. e.g in the example above, seting this to ``"whisper"`` will automaticaly add ``EmbarkJS.setProvider('whisper')`` to the generated code + * ``available_providers`` (array: ["whisper", "orbit"]) list of communication platforms to be supported on the dapp. This will affect what's available with the EmbarkJS library on the dapp so if you don't need Orbit for e.g, removing it from this will considerably reduce the file size of the generated JS code. + diff --git a/docs/configuring-storage.rst b/docs/configuring-storage.rst index dd2ad662..592f2295 100644 --- a/docs/configuring-storage.rst +++ b/docs/configuring-storage.rst @@ -1,7 +1,7 @@ Configuring Storage (IPFS) ========================== -Embark will check your prefered storage configuration in the file ``config/storage.json``. This file will contain the prefered configuration for each environment. With ```default``` being the configuration fields that applies to every environment. Each of those can be individually overriden in a per environment basis. +Embark will check your prefered storage configuration in the file ``config/storage.json``. This file will contain the prefered configuration for each environment. With ``default`` being the configuration fields that applies to every environment. Each of those can be individually overriden in a per environment basis. e.g : diff --git a/docs/creating-a-new-dapp.rst b/docs/creating-a-new-dapp.rst index dd39a082..bd52c029 100644 --- a/docs/creating-a-new-dapp.rst +++ b/docs/creating-a-new-dapp.rst @@ -8,23 +8,35 @@ If you want to create a blank new app. $ embark new AppName $ cd AppName +To run Embark then in one console run: + +.. code:: bash + + $ embark blockchain + +And in another console run: + +.. code:: bash + + $ embark run + DApp Structure ============== .. code:: bash app/ - |___ contracts/ #solidity or serpent contracts + |___ contracts/ #solidity smart contracts |___ html/ |___ css/ |___ js/ config/ - |___ blockchain.json #environments configuration - |___ contracts.json #contracts configuration + |___ blockchain.json #rpc and blockchain configuration + |___ contracts.json #ethereum contracts configuration + |___ storage.json #ipfs configuration + |___ communication.json #whisper/orbit configuration + |___ webserver.json #dev webserver configuration test/ |___ #contracts tests -Solidity/Serpent files in the contracts directory will automatically be -deployed with embark run. Changes in any files will automatically be -reflected in app, changes to contracts will result in a redeployment and -update of their JS Bindings +Solidity files in the contracts directory will automatically be deployed with ``embark run``. Changes in any files will automatically be reflected in app, changes to contracts will result in a redeployment and update of their JS Bindings diff --git a/docs/embarkjs-communication.rst b/docs/embarkjs-communication.rst index b0348b24..7e28292b 100644 --- a/docs/embarkjs-communication.rst +++ b/docs/embarkjs-communication.rst @@ -1,5 +1,5 @@ -EmbarkJS - Communication -======================== +EmbarkJS - Communication (Whisper, Orbit) +========================================= **initialization** diff --git a/docs/embarkjs-storage.rst b/docs/embarkjs-storage.rst index c8a64585..a4641792 100644 --- a/docs/embarkjs-storage.rst +++ b/docs/embarkjs-storage.rst @@ -1,5 +1,5 @@ -EmbarkJS - Storage -================== +EmbarkJS - Storage (IPFS) +========================= **initialization** diff --git a/docs/index.rst b/docs/index.rst index bb0baf3c..c3550d49 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,7 @@ This is a work in progress, feel free to contribute! libraries-and-languages-available.rst using-contracts.rst configuring-storage.rst + configuring-communication.rst embarkjs.rst embarkjs-storage.rst embarkjs-communication.rst diff --git a/docs/tests.rst b/docs/tests.rst index 62c59780..2b6d0801 100644 --- a/docs/tests.rst +++ b/docs/tests.rst @@ -1,5 +1,5 @@ -Tests -===== +Testing Ethereum Contracts +========================== You can run specs with ``embark test``, it will run any test files under ``test/``.