From 76d7fac967ab08cb47d2f043cec6cb2923ef5ab5 Mon Sep 17 00:00:00 2001 From: Bart Butler Date: Wed, 31 Jan 2018 19:27:00 -0800 Subject: [PATCH] eliminate openpgp_browser.js --- Gruntfile.js | 29 +++-------------------------- src/worker/worker.js | 2 +- test/unittests.html | 2 +- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 792fa5ea..8b78d813 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,7 +51,7 @@ module.exports = function(grunt) { standalone: 'openpgp' }, // Don't bundle these packages with openpgp.js - external: [ 'crypto', 'buffer', 'node-localstorage', 'node-fetch', 'asn1.js', 'bn.js', 'jwk-to-pem' ], + external: [ 'crypto', 'buffer', 'node-localstorage', 'node-fetch', 'asn1.js' ], transform: [ ["babelify", { plugins: ["transform-async-to-generator", @@ -74,30 +74,7 @@ module.exports = function(grunt) { debug: true, standalone: 'openpgp' }, - external: [ 'crypto', 'buffer', 'node-localstorage', 'node-fetch', 'asn1.js', 'bn.js', 'jwk-to-pem' ], - transform: [ - ["babelify", { - plugins: ["transform-async-to-generator", - "syntax-async-functions", - "transform-regenerator", - "transform-runtime"], - ignore: ['*.min.js'], - presets: ["env"] - }] - ], - plugin: [ 'browserify-derequire' ] - } - }, - // TODO: remove this, as it is only necessary to get browsertest working. - openpgp_browser: { - files: { - 'dist/openpgp_browser.js': [ './src/index.js' ] - }, - options: { - browserifyOptions: { - standalone: 'openpgp' - }, - external: [ 'crypto', 'buffer', 'node-localstorage', 'node-fetch' ], + external: [ 'crypto', 'buffer', 'node-localstorage', 'node-fetch', 'asn1.js' ], transform: [ ["babelify", { plugins: ["transform-async-to-generator", @@ -330,6 +307,6 @@ module.exports = function(grunt) { grunt.registerTask('test', ['eslint', 'mochaTest']); grunt.registerTask('coverage', ['mocha_istanbul:coverage']); grunt.registerTask('saucelabs', ['default', 'copy:browsertest', 'connect:test', 'saucelabs-mocha']); - grunt.registerTask('browsertest', ['browserify:openpgp_browser', 'copy:browsertest', 'connect:test', 'keepalive']); + grunt.registerTask('browsertest', ['browserify:openpgp', 'copy:browsertest', 'connect:test', 'keepalive']); }; diff --git a/src/worker/worker.js b/src/worker/worker.js index 1e411d18..2b25f319 100644 --- a/src/worker/worker.js +++ b/src/worker/worker.js @@ -19,7 +19,7 @@ self.window = {}; // to make UMD bundles work -importScripts('openpgp_browser.js'); // FIXME +importScripts('openpgp.js'); var openpgp = window.openpgp; var MIN_SIZE_RANDOM_BUFFER = 40000; diff --git a/test/unittests.html b/test/unittests.html index 3ee2b4a6..47f16d5d 100644 --- a/test/unittests.html +++ b/test/unittests.html @@ -10,7 +10,7 @@
- +