mirror of https://github.com/embarklabs/embark.git
update docs
This commit is contained in:
parent
62ce3004a0
commit
18c299fa3a
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
@ -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 :
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
EmbarkJS - Communication
|
||||
========================
|
||||
EmbarkJS - Communication (Whisper, Orbit)
|
||||
=========================================
|
||||
|
||||
**initialization**
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
EmbarkJS - Storage
|
||||
==================
|
||||
EmbarkJS - Storage (IPFS)
|
||||
=========================
|
||||
|
||||
**initialization**
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Tests
|
||||
=====
|
||||
Testing Ethereum Contracts
|
||||
==========================
|
||||
|
||||
You can run specs with ``embark test``, it will run any test files under
|
||||
``test/``.
|
||||
|
|
Loading…
Reference in New Issue