Generate openpgp.js without source map. New source map target is openpgp_debug.js. Change dependency of workers: openpgp.worker.js -> openpgp.js, openpgp.worker.min.js -> openpgp.min.js. Remove openpgp.js with maps from unittests-bundle.js
This commit is contained in:
parent
e8ef355604
commit
a4598f3bd4
36
Gruntfile.js
36
Gruntfile.js
|
@ -4,18 +4,18 @@ module.exports = function(grunt) {
|
|||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
browserify: {
|
||||
openpgp_nodebug: {
|
||||
openpgp: {
|
||||
files: {
|
||||
'dist/openpgp_nodebug.js': [ './src/index.js' ]
|
||||
'dist/openpgp.js': [ './src/index.js' ]
|
||||
},
|
||||
options: {
|
||||
standalone: 'openpgp',
|
||||
external: [ 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
},
|
||||
openpgp: {
|
||||
openpgp_debug: {
|
||||
files: {
|
||||
'dist/openpgp.js': [ './src/index.js' ]
|
||||
'dist/openpgp_debug.js': [ './src/index.js' ]
|
||||
},
|
||||
options: {
|
||||
debug: true,
|
||||
|
@ -28,14 +28,17 @@ module.exports = function(grunt) {
|
|||
'dist/openpgp.worker.js': [ './src/worker/worker.js' ]
|
||||
}
|
||||
},
|
||||
worker_min: {
|
||||
files: {
|
||||
'dist/openpgp.worker.min.js': [ './src/worker/worker.js' ]
|
||||
}
|
||||
},
|
||||
unittests: {
|
||||
files: {
|
||||
'test/lib/unittests-bundle.js': []
|
||||
'test/lib/unittests-bundle.js': [ './test/unittests.js' ]
|
||||
},
|
||||
options: {
|
||||
debug: true,
|
||||
alias: './test/unittests.js:unittests',
|
||||
external: [ 'openpgp' ]
|
||||
external: [ 'openpgp', 'crypto', 'node-localstorage' ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -48,19 +51,28 @@ module.exports = function(grunt) {
|
|||
to: 'OpenPGP.js v<%= pkg.version %>'
|
||||
}]
|
||||
},
|
||||
openpgp_nodebug: {
|
||||
src: ['dist/openpgp_nodebug.js'],
|
||||
dest: ['dist/openpgp_nodebug.js'],
|
||||
openpgp_debug: {
|
||||
src: ['dist/openpgp_debug.js'],
|
||||
dest: ['dist/openpgp_debug.js'],
|
||||
replacements: [{
|
||||
from: /OpenPGP.js VERSION/g,
|
||||
to: 'OpenPGP.js v<%= pkg.version %>'
|
||||
}]
|
||||
},
|
||||
worker_min: {
|
||||
src: ['dist/openpgp.worker.min.js'],
|
||||
dest: ['dist/openpgp.worker.min.js'],
|
||||
replacements: [{
|
||||
from: "importScripts('openpgp.js')",
|
||||
to: "importScripts('openpgp.min.js')"
|
||||
}]
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
openpgp: {
|
||||
files: {
|
||||
'dist/openpgp.min.js' : [ 'dist/openpgp_nodebug.js' ]
|
||||
'dist/openpgp.min.js' : [ 'dist/openpgp.js' ],
|
||||
'dist/openpgp.worker.min.js' : [ 'dist/openpgp.worker.min.js' ]
|
||||
}
|
||||
},
|
||||
options: {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
window = {}; // to make UMD bundles work
|
||||
|
||||
importScripts('openpgp.min.js');
|
||||
importScripts('openpgp.js');
|
||||
|
||||
var MIN_SIZE_RANDOM_BUFFER = 40000;
|
||||
var MAX_SIZE_RANDOM_BUFFER = 60000;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
BFencrypt = openpgp.crypto.cipher.blowfish,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
MD5 = openpgp.crypto.hash.md5,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
RMDstring = openpgp.crypto.hash.ripemd,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var util = openpgp.util,
|
||||
hash = openpgp.crypto.hash,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var keyring = new openpgp.Keyring(),
|
||||
chai = require('chai'),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
</script>
|
||||
<script src="lib/unittests-bundle.js"></script>
|
||||
<script>
|
||||
require('unittests');
|
||||
if (window.mochaPhantomJS) {
|
||||
mochaPhantomJS.run();
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index');
|
||||
var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp');
|
||||
|
||||
var chai = require('chai'),
|
||||
expect = chai.expect;
|
||||
|
|
Loading…
Reference in New Issue
Block a user