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