mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
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:
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']
|
||||
|
||||
Reference in New Issue
Block a user