Fix image corruption in /dist
This commit is contained in:
parent
16e9f03d8f
commit
242f1e80a7
1 changed files with 17 additions and 8 deletions
25
Gruntfile.js
25
Gruntfile.js
|
@ -127,21 +127,30 @@ module.exports = function(grunt) {
|
||||||
'protos/*',
|
'protos/*',
|
||||||
'js/**',
|
'js/**',
|
||||||
'stylesheets/*.css',
|
'stylesheets/*.css',
|
||||||
|
'!js/register.js'
|
||||||
|
],
|
||||||
|
res: [
|
||||||
'images/**',
|
'images/**',
|
||||||
'fonts/*',
|
'fonts/*',
|
||||||
'!js/register.js'
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
copy: {
|
copy: {
|
||||||
dist: {
|
res: {
|
||||||
|
files: [{ expand: true, dest: 'dist/', src: ['<%= dist.res %>'] }],
|
||||||
|
},
|
||||||
|
src: {
|
||||||
files: [{ expand: true, dest: 'dist/', src: ['<%= dist.src %>'] }],
|
files: [{ expand: true, dest: 'dist/', src: ['<%= dist.src %>'] }],
|
||||||
options: {
|
options: {
|
||||||
process: function(content, srcpath) {
|
process: function(content, srcpath) {
|
||||||
return content.replace(
|
if (srcpath.match('libtextsecure')) {
|
||||||
/textsecure-service-staging.whispersystems.org/g,
|
return content.replace(
|
||||||
'textsecure-service.whispersystems.org').replace(
|
/textsecure-service-staging.whispersystems.org/g,
|
||||||
/whispersystems-textsecure-attachments-staging.s3.amazonaws.com/g,
|
'textsecure-service.whispersystems.org').replace(
|
||||||
'whispersystems-textsecure-attachments.s3.amazonaws.com');
|
/whispersystems-textsecure-attachments-staging.s3.amazonaws.com/g,
|
||||||
|
'whispersystems-textsecure-attachments.s3.amazonaws.com');
|
||||||
|
} else {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,7 +174,7 @@ module.exports = function(grunt) {
|
||||||
tasks: ['concat:libtextsecure']
|
tasks: ['concat:libtextsecure']
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
files: ['<%= dist.src %>'],
|
files: ['<%= dist.src %>', '<%= dist.res %>'],
|
||||||
tasks: ['copy']
|
tasks: ['copy']
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue