gpgme/lang/js
Andre Heinecke d27703ea4f
Prepare build system for gpgme-js and dist it
* configure.ac: Add js as language.
* lang/Makefile.am: Add js as dist language.
* lang/js/BrowserTestExtension/Makefile.am,
lang/js/DemoExtension/Makefile.am,
lang/js/Makefile.am,
lang/js/src/Makefile.am: Populate EXTRA_DIST variables.

--
There is no actual build done yet as there seems to be
no way to build it with debian stable tools. This needs
clarification.
2018-06-19 16:40:40 +02:00
..
BrowserTestExtension Prepare build system for gpgme-js and dist it 2018-06-19 16:40:40 +02:00
DemoExtension Prepare build system for gpgme-js and dist it 2018-06-19 16:40:40 +02:00
src Prepare build system for gpgme-js and dist it 2018-06-19 16:40:40 +02:00
.babelrc js: First testing and improvements 2018-04-25 19:45:39 +02:00
.eslintrc.json js: code cleanup (eslint) 2018-06-06 13:05:53 +02:00
build_extensions.sh js: Added browser testing for unit tests 2018-05-03 18:03:22 +02:00
CHECKLIST js: getDefaultKey and verify fix 2018-06-13 15:22:03 +02:00
CHECKLIST_build js: created TestExtension and smaller fixes 2018-04-26 17:13:34 +02:00
Makefile.am Prepare build system for gpgme-js and dist it 2018-06-19 16:40:40 +02:00
package.json js: code cleanup (eslint) 2018-06-06 13:05:53 +02:00
README js: remove openpgp mode 2018-05-23 12:56:23 +02:00
README_testing js: Added browser testing for unit tests 2018-05-03 18:03:22 +02:00
unittest_inputvalues.js js: implement import/delete Key, some fixes 2018-06-06 11:57:41 +02:00
unittests.js js: change chunksize handling and decoding 2018-06-08 17:54:58 +02:00
webpack.conf_unittests.js js: Added browser testing for unit tests 2018-05-03 18:03:22 +02:00
webpack.conf.js js: created TestExtension and smaller fixes 2018-04-26 17:13:34 +02:00

gpgmejs, as contained in this directory, is a javascript library for direct use
of gnupg in browsers, with the help of nativeMessaging.

Installation
-------------
gpgmejs uses webpack, and thus depends on nodejs for building. Webpack can be
installed by running
`npm install webpack webpack-cli --save-dev`.

To create a current version of the package, the command is
`npx webpack --config webpack.conf.js`.
If you want a more debuggable (i.e. not minified) build, just change the mode
in webpack.conf.js.

Demo WebExtension:
As soon as a bundled webpack is in dist/
the gpgmejs folder can just be included in the extensions tab of the browser in
questions (extension debug mode needs to be active). For chrome, selecting the
folder is sufficient, for firefox, the manifest.json needs to be selected.
Please note that it is just for demonstration/debug purposes!

In the browsers' nativeMessaging configuration folder a file 'gpgmejs.json'
is needed, with the following content:

(The path to the native app gpgme-json may need adaption)

Chromium:
~/.config/chromium/NativeMessagingHosts/gpgmejson.json

{
  "name": "gpgmejson",
  "description": "This is a test application for gpgmejs",
  "path": "/usr/bin/gpgme-json",
  "type": "stdio",
  "allowed_origins": ["chrome-extension://ExtensionIdentifier/"]
}
The ExtensionIdentifier can be seen on the chrome://extensions page, and
changes on each reinstallation. Note the slashes in allowed_origins.


Firefox:
~/.mozilla/native-messaging-hosts/gpgmejson.json
{
  "name": "gpgmejson",
  "description": "This is a test application for gpgmejs",
  "path": "/usr/bin/gpgme-json",
  "type": "stdio",
  "allowed_extensions": ["ExtensionIdentifier@temporary-addon"]
}
The ExtensionIdentifier can be seen as Extension ID on the about:addons page if
addon-debugging is active. In firefox, the temporary addon is removed once
firefox exits, and the identifier will need to be changed more often.