taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit c9ad148437fdfe63a4d47afbe1e65bb0794af67c
parent eb9501d7ad714a552ad9e320ea3ee9248c6c51e8
Author: Florian Dold <florian.dold@gmail.com>
Date:   Thu, 21 Jan 2016 11:14:37 +0100

dev docs

Diffstat:
MMakefile | 1-
Mapi-mint.rst | 2+-
Mdev-wallet-wx.rst | 47++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -52,7 +52,6 @@ clean: # The html-linked builder does not support caching, so we # remove all cached state first. html: - rm -rf $(BUILDDIR)/* $(SPHINXBUILD) -b html-linked $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/api-mint.rst b/api-mint.rst @@ -56,7 +56,7 @@ possibly by using HTTPS. // concatenation of all SHA-512 hashes of the RSA denomination public keys // in `denoms` in the same order as they were in `denoms`. Note that for // hashing, the binary format of the RSA public keys is used, and not their - // base32_ encoding. Wallets cannot do much with this signature by itself; + // `base32 encoding <base32>`_. Wallets cannot do much with this signature by itself; // it is only useful when multiple clients need to establish that the mint // is sabotaging end-user anonymity by giving disjoint denomination keys to // different users. If a mint were to do this, this signature allows the diff --git 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 **lib/** **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`: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +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. + + ---------- Emscripten ---------- @@ -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 <http://mochajs.org/>`_ and the `better-assert <https://github.com/tj/better-assert>`_ assertion library. -Run the default test suite with ``XXX``. +Run the default test suite with ``npm run test``, which will +call `moch` with the right parameters.