diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-01-21 11:14:37 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-01-21 11:14:37 +0100 |
commit | c9ad148437fdfe63a4d47afbe1e65bb0794af67c (patch) | |
tree | 8e2e2a68db46086c6a337c8b1674b8f46140521e /dev-wallet-wx.rst | |
parent | eb9501d7ad714a552ad9e320ea3ee9248c6c51e8 (diff) | |
download | docs-c9ad148437fdfe63a4d47afbe1e65bb0794af67c.tar.gz docs-c9ad148437fdfe63a4d47afbe1e65bb0794af67c.tar.bz2 docs-c9ad148437fdfe63a4d47afbe1e65bb0794af67c.zip |
dev docs
Diffstat (limited to 'dev-wallet-wx.rst')
-rw-r--r-- | dev-wallet-wx.rst | 47 |
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 **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. |