path: root/dev-wallet-wx.rst
diff options
authorFlorian Dold <>2016-01-21 11:14:37 +0100
committerFlorian Dold <>2016-01-21 11:14:37 +0100
commitc9ad148437fdfe63a4d47afbe1e65bb0794af67c (patch)
tree8e2e2a68db46086c6a337c8b1674b8f46140521e /dev-wallet-wx.rst
parenteb9501d7ad714a552ad9e320ea3ee9248c6c51e8 (diff)
dev docs
Diffstat (limited to 'dev-wallet-wx.rst')
1 files changed, 46 insertions, 1 deletions
diff --git a/dev-wallet-wx.rst b/dev-wallet-wx.rst
index d5b7c21a..2fdc7252 100644
--- a/dev-wallet-wx.rst
+++ b/dev-wallet-wx.rst
@@ -39,6 +39,7 @@ Project Structure
**manifest.json** extension configuration
**package.json** node.js package configuration
**tsconfig.json** TypeScript compiler configuration
+ **gulpfile.js** Build tasks script
**vendor/** 3rd party libraries
**wallet/** actual application logic
@@ -53,6 +54,47 @@ Project Structure
**pages/** pages shown in browser tabs
**popup/** pages shown the extension popup
+Building the Wallet
+To build the extension for use during development, simply run the TypeScript compiler
+from the extension directory:
+.. code-block:: sh
+ $ cd wallet.git/wallet_webextension/extension/
+ $ tsc
+This will use the ``tsconfig.json`` with development options such as `source map`_ support.
+.. _`source map`:
+When TypeScript source files are added or deleted to the project, make sure that the
+globs in ``gulpfile.js`` match them so that they will be compiled. The ``tsconfig.json``
+is generated by running:
+.. code-block:: sh
+ $ gulp tsconfig
+.. caution::
+ Do not edit the ``tsconfig.json`` manually. The source files should be defined in
+ one place, and that is ``gulpfile.js``.
+To pack the extension in a format that can be uploaded to the Google Webstore, run:
+.. code-block:: sh
+ $ gulp package
+This will build the wallet without source maps, copy resource files (which also need to be
+specified in ``gulpfile.js``) and create an archive.
@@ -62,6 +104,8 @@ to JavaScript compiler. Emscripten is used in the *wxwallet* to access
low-level cryptography from *libgcrypt*, and miscellaneous functionality from
*libgnunetutil* and *libtalerwallet*.
+TODO: say things about wrappers
Target Environments and Modularization
@@ -102,5 +146,6 @@ Test cases for the wallet are written in TypeScript and
run with `mochajs <>`_ and the `better-assert <>`_ assertion
-Run the default test suite with ``XXX``.
+Run the default test suite with ``npm run test``, which will
+call `moch` with the right parameters.