Generate key_worker.js
Instead of calling importScripts, which is prone to relative path issues, generate the worker script with everything it needs included.
This commit is contained in:
parent
7af42a27c5
commit
bdecf5cc44
3 changed files with 39932 additions and 2 deletions
14
Gruntfile.js
14
Gruntfile.js
|
@ -60,6 +60,16 @@ module.exports = function(grunt) {
|
|||
],
|
||||
dest: 'js/libtextsecure.js',
|
||||
},
|
||||
key_worker: {
|
||||
options: {
|
||||
banner: 'var window = this;\n',
|
||||
},
|
||||
src: [
|
||||
'js/libtextsecure.js',
|
||||
'libtextsecure/key_worker.js'
|
||||
],
|
||||
dest: 'js/key_worker.js'
|
||||
},
|
||||
libtextsecuretest: {
|
||||
src: [
|
||||
'components/mocha/mocha.js',
|
||||
|
@ -152,6 +162,10 @@ module.exports = function(grunt) {
|
|||
files: ['./libtextsecure/*.js', './libtextsecure/storage/*.js'],
|
||||
tasks: ['concat:libtextsecure']
|
||||
},
|
||||
key_worker: {
|
||||
files: ['<%= concat.key_worker.src %>'],
|
||||
tasks: ['concat:key_worker']
|
||||
},
|
||||
dist: {
|
||||
files: ['<%= dist.src %>'],
|
||||
tasks: ['copy']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue